CurEquity is an array. Since you are setting the curEquity in a loop I think 
you will need to use an index, CurEquity[bar] = bo.Equity; That will fill the 
CurEquity array so it can be plotted correctly.

Barry

--- In [email protected], zeek ing <zeekin...@...> wrote:
>
> Hello all,
> I am trying to access my account equity from the backtester and plot it on
> the chart. Below is the code I have but I am pretty sure that it is wrong
> but not sure why. Can anyone help???
> 
> 
> Curequity=0;
> SetOption("UseCustomBacktestProc", True );
> 
> if( Status("action") == actionPortfolio )
> {
>   bo = GetBacktesterObject();
> 
>   bo.PreProcess(); // Initialize backtester
> 
>   for(bar=0; bar < BarCount; bar++)
>   {
>    bo.ProcessTradeSignals( bar );
> 
>    CurEquity = bo.Equity;
>   }
>   bo.PostProcess();
> }
> Plot(CurEquity,"\nCurEquity",colorYellow,1);+
>


Reply via email to