Hello,
I have calculated weights for a number of assets in a portfolio strategy, but I can't find any good instructions in the manual how to properly "execute" those weights.

I have used other platforms that had a function that lets you set a weight for an asset and the platform will then execute trades (long or short) until this weight is reached (based on account balance).

I haven't found such thing for Zorro. Alternatively I could calculate the new amount of lots myself (I have found the assign and distribute functions) and compare it with the current lots to find out if I need to buy or sell or do nothing. But how do I see how many open positions the account has for an asset? Only thing I found in the manual is a for(open_trade) loop where I would have to check every loop if the current trade corresponds to the asset I want to check with TradeAsset. That seems suboptimal.

Is there a better way to automatically reach weights or is there a better way to check the current open position (if any) for an asset? Currently for testing I simply close all positions when it's time to reassign and then just create the new ones in full but that creates unnecessary commission/spread when lots stay the same or nearly the same.