Good Day
I am trying to build a money management algorithm that will base exposure on maximum drawdown.The initial exposure will be set according to the backtest result.
The drawdown value will be set according to the backtest result.
I have been thinking along the lines of using the StrategyProfit command to always store the highest profit level as well as the lowest profit level along with their respective positions using barindex and tradeindex.
Then depending on whether a new high profit was made before a new low (and vice versa) calculate the difference between the two levels as the max drawdown.
Have anyone else tried calculating the running max drawdown of their strategy?