I want to add the "MaxTradeDrawdown" performance stat to my backtest
results.  I'm using the following code, but it is not displaying the
needed stat in the results. Can anyone help?

SetOption("UseCustomBacktestProc", True);
SetCustomBacktestProc("");
if( Status("action") == actionPortfolio )
{
     bo = GetBacktesterObject();
     bo.Backtest();
     stats = bo.GetPerformanceStats(0);
     dd = stats.GetValue("MaxTradeDrawdown");
     bo.AddCustomMetric( "Trade drawdown", dd );

}

........  my backtest code here .........

Reply via email to