forgot to mention that running only one algo in your portfolio, this is fine as it is… but “strategyProfit” is only per algo in proOrder.
So if you’re running multiple algos, you should periodically re-start your algos with an updated MMstartCapital, for the algo to keep up with gains and/or losses of other algos…