Download MetaTrader 5

newbie in need of help

To add comments, please log in or register
MQL5 language supports OpenCL. Try it!
ttt
10
ttt 2013.12.20 20:58 
   request.action=TRADE_ACTION_PENDING;
   request.symbol=_Symbol;
   request.volume=Lots;
   request.type=ORDER_TYPE_BUY_STOP;
   request.type_filling=ORDER_FILLING_FOK;
   request.deviation=100;
   request.sl=NormalizeDouble(last_tick.bid-Safety*_Point+Way*_Point,_Digits);
   request.price=NormalizeDouble(last_tick.ask+Way*_Point,_Digits);

 hello, i am new to mql5 

 Can someone help me?

 How "request.deviation=100" works here?

 then price goes up through buy stop level,  can buy dealed price somehow be more than request.price+ 100*_Point?

can someone explain, if there is mistake somethere 

ttt
10
ttt 2013.12.20 21:02  

then price goes up more than BUY_STOP price, does deviation works here?

Alain Verleyen
Moderator
30737
Alain Verleyen 2013.12.20 21:13  
larva27:

then price goes up more than BUY_STOP price, does deviation works here?

Can you please, use SRC button when posting code.

Please read documentation. Pending orders doesn't need or use "deviation".

Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure - Documentation on MQL5
To add comments, please log in or register