Did you search the forum for other threads and posts about OrderSend Error 138? You would have found many, many threads and posts on it!
Did you make the effort to look at the MQL4 documentation to see what Error 138 means? It means there was a "requote"!
Do you know what a "requote" is? Did you search the web for the meaning of a "Requote"? It means that the price you are requesting is not accepted by the broker at that time.
The reason is that you are trying to buy at the bid price, but the market will only allow you to buy it at the ask price.
Why do you not know this? Because you did not read the documentation: Requirements and Limitations in Making Trades
The rules are that you enter a Buy at the market Ask price and exit at the Bid price. For a Sell you enter at the market Bid price and exit at the Ask price.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have written a code which is running as per my requirement in the demo account. However, when I wanted to perform a backtesting of the EA, it is giving me "OrderSend error 138" for all the trades.
Is there a way to resolve this.