Hello,
I need to close orders in pairs within a very short time. Any delay could mean a loss. If both can't be closed right now, better close none.
How do you code a bulletproof way to do this with MT4 ?
One order may be closed while suddenly the connection breaks down, we get TradeContextBusy and all this crap .. is there any way to work around this and close two orders 100% or not at all ?
It seems the only way is to set a StopLoss as orders will be closed server side, but what if only one order gets the SL set and while I try to set the 2nd SL problems happen ?
My EA can be found here:
http://www.forexfactory.com/showthread.php?t=429651
I need to close orders in pairs within a very short time. Any delay could mean a loss. If both can't be closed right now, better close none.
How do you code a bulletproof way to do this with MT4 ?
One order may be closed while suddenly the connection breaks down, we get TradeContextBusy and all this crap .. is there any way to work around this and close two orders 100% or not at all ?
It seems the only way is to set a StopLoss as orders will be closed server side, but what if only one order gets the SL set and while I try to set the 2nd SL problems happen ?
My EA can be found here:
http://www.forexfactory.com/showthread.php?t=429651