![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm having the same problem with OrderSend over and over again. Correct me if I'm wrong, but this should happen after an OrderSend: the execution of an EA will be halted after an OrderSend until the server will reply that the order is accepted (ticketnumber will be returned) or rejected ( -1 will be returned). My EA's are programmed in such a way that it will retry the order for a couple of times if the order has been rejected. Sometimes however (and I have to admit that this happens very rarely, but still it happens) the order is resend after the -1 return value. I can see that the order is accepted but at the same time the previous order (the one that returned the -1 value) is accepted too! If one of you has explanation for this I would be most grateful.
Suppose you send an order to the server and there will be no response. What will happen with the execution of the EA. Will the EA be halted forever until you restart it manually? Could it be that the code of MT4 (great software by the way!) is having its own timer, so if there's no response of the server after x minutes the client terminal will return itself a value of -1 instead of the server? It's the only way I can explain my problem that way. But I could be completely wrong here.
Hendrick.