Download MetaTrader 5
To add comments, please log in or register
Do you want to learn MQL5? 300 articles will help you!
Zek Cek
83
Zek Cek 2013.03.28 18:00 
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
Alain Verleyen
Moderator
30635
Alain Verleyen 2013.03.28 18:04  
Zek:
I don't understand documentation for open order buy stop or just buy !?
What you do not understand in documentation ?
Zek Cek
83
Zek Cek 2013.03.28 18:09  
all !
Alain Verleyen
Moderator
30635
Alain Verleyen 2013.03.28 18:11  
Zek:
all !
May be you can try on russian site then :-D
Zek Cek
83
Zek Cek 2013.03.28 18:14  

Les belges sont fou ! 

i search how to use mqltraderequest...

it's structure ok... 

Zek Cek
83
Zek Cek 2013.03.28 18:20  
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
Alain Verleyen
Moderator
30635
Alain Verleyen 2013.03.28 18:25  
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.
Zek Cek
83
Zek Cek 2013.03.28 18:28  

it's important ?

it's possible do not incluse to the code ?

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

Zek Cek
83
Zek Cek 2013.03.28 18:35  

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
Simon Gniadkowski
Moderator
17996
Simon Gniadkowski 2013.03.28 19:32  
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.
Zek Cek
83
Zek Cek 2013.03.28 20:57  

what is the change with the price ?

 

i don't understand ENUM_SYMBOL_TRADE_EXECUTION !? 

 

Not this choice in mql4 !... 

/ /12
To add comments, please log in or register