opening positions in series form

 

Hi

I want to open a position and after some price changes, open another position in different volume.

In which function (onInit or onTick) should I write codes, and how can I access to open_price of the first position?

Thanks.  

 
Peyman Ghodoomi :

Hi

I want to open a position and after some price changes , open another position in different volume.

In which function (onInit or onTick) should I write codes, and how can I access to open_price of the first position?

Thanks.  

Start from the very beginning: launch the MQL5 Wizard and create a template for your Expert Advisor. Attach the result using the button Attach file.

 
Vladimir Karputov #:

Start from the very beginning: launch the MQL5 Wizard and create a template for your Expert Advisor. Attach the result using the button .


Thanks.