I have the line:

Spread = RollLong = RollShort = Commission = Slippage = 0;

in my run() loop, yet when I run this strategy with 4 assets, Zorro is calculating nonzero transaction costs in the results:

Transaction costs -1.26$ spr, 0$ slp, 0$ rol, -1.26$ com

Debugging with printf(...) shows that the Spread is 0 for 2 of the assets, but 0.01 for the other 2. Is this not incorrect behaviour?

When I add

Spread = Commission = 0;

inside the while(loop(Assets)) loop, the transaction costs are then 0, but is that supposed to be necessary?