OrderSend()和OrderModify()容易出错的地方

  1. 划点够大,一般设置10点;
  2. 避免重复下单,把OrderSend和OrderMoify放在一个循环中,检查错误;出现这种情况有,要么你的ea不好,缺少检查环节,重复下单;要么broker押单,然后释放,结果你的ea连续出单..2019-01-30
  3. 计算手数时,使用NormalizeDouble(price,Digits),某些服务器拒绝最小位数超过其最小允许值;
  4. 下单前确认IsTradeAllowed()返回true;
  5. 确保止损和止盈不要离Bid/Ask太近,可避免130或其它类似报错。
  6. 设置time-out在下单时,然后查询,设置“已解决”
  7. If you have a condition that you think specifies a new order, then ensure that it stays "OK" for a certain number of seconds/minutes.  You do this by saving in a static or global int variable, the "TimeCurrent()" when it last occurred (and setting that to zero if the condition is false) and then only if it has remained true until  (TimeCurrent() - saved_time) >= some_interval of seconds.
  8. 考虑使用LibOrderReliable.mq4加强代码库。

本博客所有文章如无特别注明均为原创。作者:天泓评测
分享到:更多

相关推荐

发表评论

路人甲 表情
Ctrl+Enter快速提交

网友评论(0)