molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Sat Apr 27, 2024 11:44 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: how can i open 2 buy positions
PostPosted: Tue Aug 19, 2014 12:33 am 
Offline

Joined: Fri Aug 13, 2010 2:18 pm
Posts: 77
how can i open the second buy position while the first one(buy position) still opening ?
if i opened position for buy Eur/Usd at 1.3340 (after I added some condition ) then I need to open an other buy Eur/Usd position! Is there any way to do that one by using Strategy Builder?


Top
 Profile  
 
 Post subject: Re: how can i open 2 buy positions
PostPosted: Tue Aug 19, 2014 8:25 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Not sure if I follow you. But if you want to do something like this
if condition 1 then buy
if condition 2 and there is one position open then buy (pyramiding trades)
In condition 2 you need to use the count of opened positions in the mql icon. Look at the code and find the part that counts and use it in the mql icon. We want to make it easier but it will have to wait a bit for version 3.3 For now in 3.2 you need to use the mql icon


Top
 Profile  
 
 Post subject: Re: how can i open 2 buy positions
PostPosted: Tue Aug 19, 2014 10:44 am 
Offline

Joined: Fri Aug 13, 2010 2:18 pm
Posts: 77
Thanks a lot, but in the START Icon there is option said: The Maximum Number of Positions in the START icon is defined per type (long or short). This means setting Maximum Number of Positions=1 will allow one long and one short position

in this case you know what is the problem: the problem is: if condition 1 then buy // i need only just buy one position no more
if condition 2 and there is one buy position open then buy // i need only to buy one position for that condition.


Top
 Profile  
 
 Post subject: Re: how can i open 2 buy positions
PostPosted: Tue Aug 19, 2014 8:44 pm 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
Set max positions to 2 and use:
if condition 1 and positions=0 then buy
if condition 2 and there is one buy position open then buy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009