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

how can i open 2 buy positions
http://www.molanis.com/forum/viewtopic.php?f=3&t=6064
Page 1 of 1

Author:  hand2010 [ Tue Aug 19, 2014 12:33 am ]
Post subject:  how can i open 2 buy positions

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?

Author:  molanisfx [ Tue Aug 19, 2014 8:25 am ]
Post subject:  Re: how can i open 2 buy positions

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

Author:  hand2010 [ Tue Aug 19, 2014 10:44 am ]
Post subject:  Re: how can i open 2 buy positions

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.

Author:  admin [ Tue Aug 19, 2014 8:44 pm ]
Post subject:  Re: how can i open 2 buy positions

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

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/