JCL,
To size positions in a portfolio of algos (which implement equity curve trading), I first wanted to poll all algos for their On/Off status and then re-allocate capital/size accordingly.

With this I hit several problems:
1)
Quote:
You can have many asset/algo loops, but only 2 nested, and the number of assets and algos must not change between loops.

I found that 2 Algo (only) loops do not work: the program just doesnt get into the second one (printf from the second loop does not print anything)

2) Alternatively, I tried to have one algo loop working in phantom mode to generate trades, and then change TradeLots of just opened trades in a for(open_trades) loop. Did not work because TradeLots appears to be read-only.

How can I achieve what I need?

Thanks a lot in advance for your advice.