Hi @l-andorrĂ ,
Here is what I did;
I run a loop for a group of conditions which try to match an indicator's parameters with price level and create buy/low trades accordingly.
Loop runs n times (10 in my setup) and changes some inputs for conditions every time it runs. After running n times, condition at the most top level resets variables to initial values and loop restarts.
If first condition is met a buy/sell order is created with group number 1.
If second condition is met a buy/sel lorder is created with group number 2.
.
.
etc.
Group numbers are derived from values of variables used in indicator. So for example, if parameter 1 is matched to create a buy order, it is created with 'Group Number 1' and continiues to run loop till end. When values of variables are reseted and loop tests same parameter values, it also checks if there is a trade with same group number. If parameter 1 matches again and there is buy trade running with group number 1, no other buy trade will be created for parameter 1.
On the other hand, sell trade will be created if it matches the conditions for parameter 1.
For some reasons I can only share related part of the stategy.

I believe you can have as many groups as your balance & margin allows with this logic. You can manage the groups any way you want.
You can also add to same group with 'If trade' block by using the same variable in Group # area if needed.
One important thing is that, calculations and conditions need to run in an order. If you do not arrange the running order you will get different group number calculations and will end with undesirable results.
If you need more detail, I will try my best to do so.
I hope it helps.
Regards.