OrderSend Error 128

 

Hi,

sometimes I send order, then it is on  server  and after one minute  I get error 128 (TRADE_TIMEOUT). Is it possible that I get ticket equal to -1 and error 128, but the order is opened after some time ? Or after I get error 128 order is deleted on server?


Thanks,

Piotr

 

https://docs.mql4.com/trading/errors

ERR_TRADE_TIMEOUT    128    Timeout for the trade has been reached. Before retry (at least, in 1-minute time), it is necessary to make sure that trading operation has not really succeeded (a new position has not been opened, or the existing order has not been modified or deleted, or the existing position has not been closed)

I would go through a OrderSelect() Loop and make sure the order was not placed then decide what to do next.

 
Yes, I know it, but can this order succeed after some time?For example I get this error, then I wait for one minute and after this time it opens?
 

A timeout means the terminal didn't get a response back from the server. The trade may or may not have opened on the server. There is no way to know.

When you get a new tick, the orderSelect loop will find it if it is open.

If this occurs frequently, it's a problem with the broker. Infrequently - network problems.

 
p.dymek:
Yes, I know it, but can this order succeed after some time?For example I get this error, then I wait for one minute and after this time it opens?
but can this order succeed after some time?  No. ( I think I should add a disclaimer here... But lets leave it at that ). If you reconnect to the broker server with the OrderSelect Loop and it's not there ... then it's not gonna be there later.
 
Thank you:)
 
Only if your broker takes longer then a minute to open an order. Get a different broker.
Reason: