MQL4 ERROR 138

To add comments, please log in or register
Sackaria Nakamela
270
Sackaria Nakamela  
Good day guys! Am still learning coding with mql4 and I am stack with "Order close error 138" (description: Requote). Am trying to figure out how to correct, please any professional to help.
Marco vd Heijden
Moderator
8159
Marco vd Heijden  
Check the return value of ordersend.
Fernando Carreiro
4360
Fernando Carreiro  
Sackaria Nakamela: Good day guys! Am still learning coding with mql4 and I am stack with "Order close error 138" (description: Requote). Am trying to figure out how to correct, please any professional to help.

You are probably using the wrong price for the operation!

Remember that Buy orders open at the Ask price and close at the Bid price, while Sell Orders open at the Bid price but close at the Ask price.

If that does not solve your problem, then post the code for analysis.

Sackaria Nakamela
270
Sackaria Nakamela  
Marco vd Heijden:
Check the return value of ordersend.

Thankx, I got it right.

Sackaria Nakamela
270
Sackaria Nakamela  
Fernando Carreiro:

You are probably using the wrong price for the operation!

Remember that Buy orders open at the Ask price and close at the Bid price, while Sell Orders open at the Bid price but close at the Ask price.

If that does not solve your problem, then post the code for analysis.

Your are perfectly correct sir. That was the problem i had. Thank you!

To add comments, please log in or register