How open order in mql5 ?

 
I don't understand documentation for open order buy stop or just buy !?
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
 
Zek:
I don't understand documentation for open order buy stop or just buy !?
What you do not understand in documentation ?
 
all !
 
Zek:
all !
May be you can try on russian site then :-D
 

Les belges sont fou ! 

i search how to use mqltraderequest...

it's structure ok... 

 
what does it mean =>   MqlTradeRequest request={0}; ??
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
 
Zek:
what does it mean =>   MqlTradeRequest request={0}; ??
Declaration of a variable request of type MqlTradeRequest, and all elements of the structure initialized to 0.
 

it's important ?

it's possible do not incluse to the code ?

i thinks it's for have not error and not conflit ? 

 

My program work :

   //buy
   MqlTradeRequest request={0};
   request.action=TRADE_ACTION_DEAL;
   request.magic=1234;            
   request.symbol=_Symbol;               
   request.volume=0.1;                        
   request.sl=0;                                
   request.tp=0;                              
   request.type=ORDER_TYPE_BUY;              
   //request.price=GetRandomPrice(request.type);  // open price
   MqlTradeResult result={0};
   OrderSend(request,result); 

 Just structure price (open price) i d'ont understand, it's not important ?

Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants
Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants
  • www.mql5.com
Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants - Documentation on MQL5
 
Zek:

My program work :

 Just structure price (open price) i d'ont understand, it's not important ?

It depends on the symbol execution type  ( ENUM_SYMBOL_TRADE_EXECUTION ) if it's Market or Exchange execution the you don't send the open price,  if it's Request or Instant execution then you need to send the open price.

There is a little more info in this thread:  https://www.mql5.com/en/forum/11303 

stop losses not showing up in backtest
stop losses not showing up in backtest
  • www.mql5.com
stop losses not showing up in backtest.
 

what is the change with the price ?

 

i don't understand ENUM_SYMBOL_TRADE_EXECUTION !? 

 

Not this choice in mql4 !... 

Reason: