Download MetaTrader 5

Confusion about stop limit pending order

To add comments, please log in or register
nicolasxu
304
nicolasxu  

Say the current "EURUSD" price is 1.12345, and then I placed a order 

 MqlTradeRequest req = {0};

req.action    = TRADE_ACTION_PENDING;
req.type      = ORDER_TYPE_BUY_STOP_LIMIT; // ENUM_ORDER_TYPE
req.price     = 1.28;
req.stoplimit = 1.3;
req.sl        = 1.27000  ;
req.tp        = 1.27850 + _Point*200;


.... 

Wheere the req.stoplimit(1.3) is the "stop" at which order will be placed.  

The req.price(.128) will be the "limit" combined with req.deviation, if price is not whithin the range, no buy. 

Is my understanding correct? Please correct me if I am wrong. 

Thank you! 

Alain Verleyen
Moderator
33615
Alain Verleyen  
nicolasxu:

Say the current "EURUSD" price is 1.12345, and then I placed a order 

Wheere the req.stoplimit(1.3) is the "stop" at which order will be placed.  

The req.price(.128) will be the "limit" combined with req.deviation, if price is not whithin the range, no buy. 

Is my understanding correct? Please correct me if I am wrong. 

Thank you! 

No your understanding is not correct, please check the documentation.

deviation is not used for pending orders.

nicolasxu
304
nicolasxu  
angevoyageur:

No your understanding is not correct, please check the documentation.

deviation is not used for pending orders.

Thanks a lot!
To add comments, please log in or register