Error 138

 
Hello everyone, I'm new to mql programming, and I'm also using google translator, so sorry for any error, 
I'm having a very serious problem with my code, I'm trying to open a pending order using EA, but it always gives that error 138 , 
there is the code treble with problems for you to see:
Files:
 
Erhoz:
Hello everyone, I'm new to mql programming, and I'm also using google translator, so sorry for any error, 
I'm having a very serious problem with my code, I'm trying to open a pending order using EA, but it always gives that error 138 , 
there is the code treble with problems for you to see:

You must learn to read documentation and use the search when you have a problem:

138

ERR_REQUOTE

Requote


Runtime Errors - Codes of Errors and Warnings - Standard Constants, Enumerations and Structures - MQL4 Reference
Runtime Errors - Codes of Errors and Warnings - Standard Constants, Enumerations and Structures - MQL4 Reference
  • docs.mql4.com
Runtime Errors - Codes of Errors and Warnings - Standard Constants, Enumerations and Structures - MQL4 Reference
 
Erhoz:
A sell must use BID price to open.
 
Erhoz:

By the way. The code you show, is for a Market Order not a Pending order!

 

Erhoz:

, I'm trying to open a pending order using EA, but it always gives that error 138 , 
there is the code treble with problems for you to see:

Hello,

---

You should use this for pending order

ticket=OrderSend(_Symbol,OP_SELLLIMIT,
Reason: