设为首页收藏本站

 找回密码
 注册
查看: 881|回复: 0
打印 上一主题 下一主题

麻烦版主帮忙看一下。 [复制链接]

Rank: 1

精华
0
UID
277671
积分
13
帖子
7
主题
4
阅读权限
10
注册时间
2019-4-10
最后登录
2021-2-2
跳转到指定楼层
1#
发表于 2019-10-25 23:08:11 |只看该作者 |倒序浏览
用在日线上,价格低于两日低点开空,高于昨天高点就平仓,做多反之,这样写合适吗?
Begin
           If(!CallAuctionFilter()) Return;
                highd1 = HighD(1);
                highd2 = HighD(2);
                lowd1 = LowD(1);
                lowd2 = LowD(2);
                MyEntryPrice = AvgEntryPrice;
                MinPoint = MinMove*PriceScale;
               
                BK = HighD1 < highd2 && High > highd2 ;
                BP = Low <lowd1;
                SK =  lowD1 > lowd2 && Low< LOWD2;
                SP =  High>HIGHD1;
               
                BS = Low < MyEntryPrice-MinPoint*8;
                SS = High > MyEntryPrice+minpoint*8;
               
        If (BK && MarketPosition != 1 && CS < 2)
            Buy(Lots,High);
                Commentary("bk");
                cs = cs+1;
        If (BP && MarketPosition == 1)
            Sell(Lots,low);
                Commentary("BP");
        If (sk && MarketPosition != -1 && CS <2)
            SellShort(Lots,low);
                Commentary("SK");
                cs = cs+1;
        If (sp && MarketPosition == -1)
            BuyToCover(Lots,high);
                Commentary("SP");
        If (BS && MarketPosition ==1)
                Sell(Lots,low);
                Commentary("Bs");
        If (ss && MarketPosition == -1)
                 BuyToCover(Lots,high);
                Commentary("SS");
       
End
您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-4-25 14:22

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部