As you know Portfolio backtester creates special ticker “~~~EQUITY” which holds portfolio-level equity of the system under test. Some may find it useful to save this equity into another symbol after backtest for future analysis and\/or comparison. Good news is that it is possible to do that automatically using custom backtester procedure<\/a> and AddToComposite<\/a> function. The formula below shows how.<\/span>\/\/ A pre-5.50 way of making portfolio copy
\/\/ YOUR TRADING SYSTEM HERE
\/\/ ....
<\/span>SetCustomBacktestProc<\/span>(<\/span>""<\/span>);
if( <\/span>Status<\/span>(<\/span>"action"<\/span>) == <\/span>actionPortfolio <\/span>)
{
<\/span>bo <\/span>= <\/span>GetBacktesterObject<\/span>();
<\/span>bo<\/span>.<\/span>Backtest<\/span>();
<\/span>AddToComposite<\/span>( <\/span>Foreign<\/span>(<\/span>"~~~EQUITY"<\/span>,<\/span>"C"<\/span>),
<\/span>"~~~MY_EQUITY_COPY"<\/span>, <\/span>"X"<\/span>,
<\/span>atcFlagDeleteValues <\/span>| <\/span>atcFlagEnableInPortfolio <\/span>);
<\/code>