【发布时间】:2016-08-29 12:26:44
【问题描述】:
我的 EA 出现错误代码 4059
这意味着OrderModify() 在(回)测试中显然不允许使用函数。
有什么方法可以允许这样做吗?
我想要做的就是改变仓位以实现盈亏平衡,当它获得 100 点“向好”时
PrintFormat( "TKT[%.2d]OP:[%7.5f]SL:[%7.5f]CurrentPrice:[%7.5f]Stoplevel:[%.3d]FreezeLevel:[%.3d]",
aTicket,
anOpenPrice,
aCurrentSL,
anAskPrice,
stopLevel,
freezeLevel
);
SellMod = OrderModify( aTicket,
NormalizeDouble( anOpenPrice, Digits ),
NormalizeDouble( aNewSLPrice, Digits ),
NormalizeDouble( aNewTpPrice, Digits ),
0,
sellcolor
);
SendMail( "Notification of Order Modification for Ticket#"
+ IntegerToString( OrderTicket(), 10 ),
"Good news! Order Ticket#"
+ IntegerToString( OrderTicket(), 10 )
+ "has been changed to breakeven"
);
if ( !SellMod )
{ PrintFormat( "Order modification for ticket %10d has failed modify the order under the Error Code# %5d. Check MQL4 Documentation",
aTicket,
GetLastError()
);
result = false;
}
【问题讨论】:
标签: trading algorithmic-trading mql4 metatrader4