I'm using the free Expert Advisor builder here http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/.
I'm slowly getting my head around the actual coding of it all, but I can't figure out the code needed if I want to exist all open trades at once.
The existing code is this
And the opposite for Sell.
This however only closes one open Buy trade at a time. For instance, If I have multiple buy orders and want to close them ALL when the last daily candle closes below the 15sma, the EA will only close them one at a time for each daily close below the 15sma, not all on the first day.
So what would I need to do if i want all Buy orders to close at the same time with the same condition? (and tlikewise for sell)
Thanks.
I'm slowly getting my head around the actual coding of it all, but I can't figure out the code needed if I want to exist all open trades at once.
The existing code is this
QuoteDisliked
//+------------------------------------------------------------------+
//| Signal Begin(Exit Buy) |
//+------------------------------------------------------------------+
if (CloseBuy1_1 < CloseBuy1_2) Order = SIGNAL_CLOSEBUY;
And the opposite for Sell.
This however only closes one open Buy trade at a time. For instance, If I have multiple buy orders and want to close them ALL when the last daily candle closes below the 15sma, the EA will only close them one at a time for each daily close below the 15sma, not all on the first day.
So what would I need to do if i want all Buy orders to close at the same time with the same condition? (and tlikewise for sell)
Thanks.