Download MetaTrader 5
To add comments, please log in or register
Launch agents on an idle PC. It is profitable!
nicolasxu
296
nicolasxu 2014.10.06 06:47 

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
29411
Alain Verleyen 2014.10.06 12:06  
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
296
nicolasxu 2014.10.06 13:55  
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