Ordersend ERROR 138

 

Hello freinds, I got en error 138, which is needs to REQUOTE.

I do not understand it. Can anybody help me.

THKS

 

crossy,

please read OrderSend() docs.

Specifically:

"If the requested open price is fully out of date, the error 138 (ERR_REQUOTE) will be generated independently on the slippage parameter. If the requested price is out of date, but present in the thread, the position will be opened at the current price and only if the current price lies within the range of price+-slippage

"

RefreshRates() + OrderSend() values recalculations and/or consider that slippage value may be too small.

Also think about retry loop when using any of the 5 Trade Operations. The system can inform you of many issues which are very simple to handle and need not cause loss of trade...

.

btw,

allways look at MQL4 Reference - Trading functions - Execution errors

ERR_REQUOTE 138 The requested price has become out of date or bid and ask prices have been mixed up. The data can be refreshed without any delay using the RefreshRates function and make a retry. If the error does not disappear, all attempts to trade must be stopped, the program logic must be changed.

for the why's of an error and also the what's you can do to rectify!

.

rgds