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. |
may be you should try to use something like:
while (ticket<0) { RefreshRates(); ticket = OrderSend(....); }
or maybe something like:
while (true) { RefreshRates(); ticket = OrderSend(....); if (ticket > -1) break; }
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. |
may be you should try to use something like:
or maybe something like:
No, you shouldn't . . what you should do is . . .
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.
No, you shouldn't . . what you should do is . . .
the reason behind my suggestion is because he wrote
AiGelb:
[...]but 1 of 100 orders i get Order send failed with error 138
i realized he uses a broker that intentionally feeds the terminal with a delay
and if i'm not mistaken (and i'm not) this type of brokers are doing it just for a few minutes
mostly when the market makes sharp movements (like NFP...)
Hi,
my ea works like it should but 1 of 100 orders i get Order send failed with error 138
Today i had a sell order this is the code, i even have a second order for the problem.
this is my insurance... but today it does not work.
I guess there's nothing you can do about it. It's not the EA request at a wrong price, it's the broker or your internet connection or the markets moving fast.
With 100 points slippage and your request is out of date, makes me wonder how jumpy are the markets you trade or how often your broker updates the price.
"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 order will be opened at the current price and only if the current price lies within the range of price+-slippage."
Your code says Sell at Bid and the server says the bid you know is far away now, let me update you on that (requote).
I fail to see anything that point to your EA.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
my ea works like it should but 1 of 100 orders i get Order send failed with error 138
Today i had a sell order this is the code, i even have a second order for the problem.
this is my insurance... but today it does not work.