~~~~~~~~HELP・HELP・HELP for MQL4~~~~~~~~~~~~~~~~ 新评论 Yi Chen 2016.01.11 11:23 Dear,why dose below program always display ” ordermodify error 130 ” ? void OnTick() {//---if(Hour() == 1 && OrdersTotal() == 0){int ticket=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,NULL,1,0,NULL); for(int i=0;i<=OrdersTotal();i++) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) == true && OrderType() == OP_SELL && OrderMagicNumber() == 1) { //--- calculated SL and TP prices must be normalized double stoploss=NormalizeDouble(Bid-80*Point,Digits); /*Digits=3*/ double takeprofit=NormalizeDouble(Bid+80*Point,Digits); int rsp = OrderModify(OrderTicket(),OrderOpenPrice(),stoploss,takeprofit,0,NULL); } } } } thank you! <journal>2016.01.11 21:20:34.160 USDJPY-a01,M30: 2160205 tick events (2342 bars, 2161205 bar states) processed in 0:00:03.307 (total time 0:00:05.928)2016.01.11 21:20:34.160 2015.12.29 23:59 Tester: order #1 is closed2016.01.11 21:20:30.853 2015.10.01 01:00 rr USDJPY-a01,M30: OrderModify error 1302016.01.11 21:20:30.853 2015.10.01 01:00 rr USDJPY-a01,M30: open #1 sell 0.10 USDJPY-a01 at 119.866 ok2016.01.11 21:20:30.851 2015.10.01 00:00 rr test started2016.01.11 21:20:30.282 TestGenerator: spread set to 10 ~~~~~~~~HELP・HELP・HELP for MQL4~~~~~~~~~~~~~~~~ HELP・HELP・HELP EA不能测试,请高手修改一下 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
Dear,why dose below program always display ” ordermodify error 130 ” ?
void OnTick()
{
//---
if(Hour() == 1 && OrdersTotal() == 0)
{
int ticket=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,NULL,1,0,NULL);
for(int i=0;i<=OrdersTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) == true && OrderType() == OP_SELL && OrderMagicNumber() == 1)
{
//--- calculated SL and TP prices must be normalized
double stoploss=NormalizeDouble(Bid-80*Point,Digits); /*Digits=3*/
double takeprofit=NormalizeDouble(Bid+80*Point,Digits);
int rsp = OrderModify(OrderTicket(),OrderOpenPrice(),stoploss,takeprofit,0,NULL);
}
}
}
}
thank you!
<journal>
2016.01.11 21:20:34.160 USDJPY-a01,M30: 2160205 tick events (2342 bars, 2161205 bar states) processed in 0:00:03.307 (total time 0:00:05.928)
2016.01.11 21:20:34.160 2015.12.29 23:59 Tester: order #1 is closed
2016.01.11 21:20:30.853 2015.10.01 01:00 rr USDJPY-a01,M30: OrderModify error 130
2016.01.11 21:20:30.853 2015.10.01 01:00 rr USDJPY-a01,M30: open #1 sell 0.10 USDJPY-a01 at 119.866 ok
2016.01.11 21:20:30.851 2015.10.01 00:00 rr test started
2016.01.11 21:20:30.282 TestGenerator: spread set to 10