Why are you modifying an order that is about to open? Don't and problem solved.
Don't trade at all. Problem solved. /s
That is an issue. Consider a limit getting filled while in the process of sending in the cancel request and the entire program getting blocked by the trade server's failure to respond in a timely manner. OP, you should consider using OrderSendAsync because it will not block.
- www.mql5.com
Why are you modifying an order that is about to open? Don't and problem solved.
Im not modifying an order that is about to open. Im modifying an order wich I opened a while back, while I havent got response that the order closed. The server should respond right-away the order is rejected but it doesnt, it waits full 3 minutes until I get a timeout response.
Don't trade at all. Problem solved. /s
That is an issue. Consider a limit getting filled while in the process of sending in the cancel request and the entire program getting blocked by the trade server's failure to respond in a timely manner. OP, you should consider using OrderSendAsync because it will not block.
datetime expiration = iTime(_Symbol,Timeframe,0) + PeriodSeconds(Timeframe);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Sometimes an order get executed on the server-side while my EA is on the way of processing a modify on that order. Everytime that happens it needs to wait full 3 minutes until a 'timeout' error returns, because I figure my server is simply not good on handling that.
What I need is setting a way for addressing an error if that ordersend is taking too long to execute (5 or 10 seconds). In python this could easily be done with multithreading is there a way to do something similar using mql5?
Thank you all in advance!