The logic works like this:Timmy » Mon Nov 07, 2016 8:35 am wrote: Can you please explain when the BasketProfit will kick in??? Is this tool triggered when there are trades in both directions only - and the overall profit position gets to the BasketProfit target? And will BasketProfit not activate if trades are only in one direction for one(?) (all?) pairs?
In OnTimer() it first checks if an EquityTP or EquitySL has been reached. If so, it broadcasts a (Rinse-n-Repeat) event to all the dancers that instruct them to close all their trades and restart the sequence. Secondly, it checks if currently the total profit of all trades together has exceeded BasketProfit, and if so, it broadcasts the Rinse-n-Repeat event. Then it proceeds to check for a subset of trades that exceed the MinProfit and if found it closes them.
But it is good you bring this up, as by looking at the code, I noticed an obscure bug, that makes the EA skip over the second exit condition. This will be addressed in the next version.