麻烦老师帮助查一下EA的错,谢谢!
(4月2日重新编辑帖子) 跟着教程做了一个EA,编译显示成功了,可是无法下空单,下多单正常,请哪位老师帮助解决,谢谢! 麻烦老师帮助查一下EA的错,谢谢! int buytisun=15; int Selltisun=15; int init() { return(0); } int deinit() { return(0); } int start() { double ema15M10=iMA(Symbol(),PERIOD_M15,10,0,MODE_EMA,PRICE_CLOSE,0); double ema30M10=iMA(Symbol(),PERIOD_M15,10,0,MODE_EMA,PRICE_CLOSE,0); double ema15M20=iMA(Symbol(),PERIOD_M15,20,0,MODE_EMA,PRICE_CLOSE,0); double ema30M20=iMA(Symbol(),PERIOD_M15,20,0,MODE_EMA,PRICE_CLOSE,0); if((ema15M10ema15M20 && ema30M10>ema30M20))//buy { if(buy(0.01,15,0,Symbol()+"buy",0)>0) { buytisun=15; } } for(int i=0;i=buytisun) { double buysl=OrderStopLoss(); if(OrderModify(OrderTicket(),OrderOpenPrice(),buysl+15*Point,0,0)==true) { buytisun=buytisun+15; } } } } if(OrderComment()==Symbol()+"sell") { if(((OrderOpenPrice()-Ask)/Point)>=Selltisun) { double Sellsl=OrderStopLoss(); if(OrderModify(OrderTicket(),OrderOpenPrice(),Sellsl-15*Point,0,0)==true) { Selltisun=Selltisun+15; } } } } return(0); } int buy(double Lots,int sun,int ying,string comment, int magic) { int com=0; int ticket=0; for(int i=0;i |
打赏
最新创建圈子
- 新闻EA运行效果图圈 2019-05-05
圈主:admin 帖子:1