- 精华
- 0
- 在线时间
- 675 小时
- UID
- 110114
- 积分
- 380
- 帖子
- 314
- 阅读权限
- 50
- 注册时间
- 2012-4-20
- 最后登录
- 2021-12-29
- 精华
- 0
- UID
- 110114
- 积分
- 380
- 帖子
- 314
- 主题
- 16
- 阅读权限
- 50
- 注册时间
- 2012-4-20
- 最后登录
- 2021-12-29
|
flyer 发表于 2021-5-27 18:22
老师辛苦了,提示缺少分好,在您修改的这个13行
第13行用了中文的括弧和逗号,之前没看到- if(MarketPosition==1) //有多单情况
- {
- if (high >=myentryprice+stop_win ) //止赢条件表达式
- {
- myexitprice=myentryprice+stop_win ;
- if(open >myexitprice)myexitprice=open; //如果该BAR开盘价有跳空触发,则用开盘价代替
- sell(0,myexitprice);
- }
- else if (Low <=myentryprice-stop_loss) // 止损条件表达式
- {
- myexitprice=myexitprice-stop_loss;
- if (open <myexitprice) myexitprice=open ; //如果该BAR开盘价有跳空触发,则用开盘价代替
- sell(0,myexitprice);
- }
- }
- else if (MarketPosition==-1) //有空仓的情况
- {
- if (low <=myentryprice-stop_win ) //止赢条件表达式
- {
- myexitprice=myentryprice-stop_win;
- if(open<myexitprice) myexitprice=open ;
- BuyToCover(0,myentryprice);
- }
- else if (high >=myentryprice+stop_loss) // 止损条件表达式
- {
- myexitprice=myentryprice+stop_loss;
- if (open>myexitprice) myexitprice=open;
- BuyToCover(0,myexitprice);
- }
- }
复制代码 |
|