Hi, I’m not able to find anywhere how to allocate Capital to different assets while using loop(). I want to allocate the Capital to the first asset that is going to enterLong() according to some TA indicator. Until that trade exits, the other algos won’t have any money to trade. Then, when that first trade exits because a Stop or the exitLong(), the other algos will be able to use the money (as long as their indicator is hit). So, at any time, only one combination algo/asset will use all the money.

So for instance using a combination of 2 assets and 3 algos, how should I do that?
If doing this is not possible, how can I assign a fixed amount to each asset/algo? (so, in my example, how could I assign 100 to each one of the 6 combinations?)

void run()
{
Capital =600;

while(asset(loop(“EUR/USD”, “GBP/USD”)))
while(algo(loop("H1", "H2”, "H3”)))
{
Margin=Capital+ProfitClosed; //<—— How should I modify this??

if(indicator==1) //“indicator” will be filled somewhere
enterLong();
else
if (indicator==2)
exitLong();
}
}

I don't want to use FACTORS or OptimalF, by the way, I want all the assets to have the same importance. The workshop6 talks about capital allocation but it doesn't answer my doubts...