I am trying to add a new specific column to the right of the backtester columns on the backtest results screen image, for instance something like RSI (14) for the date listed.
I am able to output a different calculation for the entire backtest as below, (borrowed from the library) but can i view a stock specific output value RSI(14) related to each trade using custom backtester?
thanks in advance,
SetCustomBacktestProc( "" );
if ( Status( "action" ) == actionPortfolio )
{
bo = GetBacktesterObject();
bo.Backtest(); // run default backtest procedure
// read Net Profit, Winners and Losers profits from the report
st = bo.GetPerformanceStats( 0 );
netProfit = st.GetValue( "NetProfit" );
tradeProfits = st.GetValue("WinnersTotalProfit") + st.GetValue("LosersTotalLoss");
bo.AddCustomMetric( "Trading profits", tradeProfits );
bo.AddCustomMetric( "Interest earnings", netProfit - tradeProfits );
}