Hi Cey

Thanks for the prompt reply.

That should enable me to achieve what I want.  My thought processes 
were working a little differently - one of these days I will get to 
think in "AB mode".

Cheers

Graham

>
> Not sure if this is what you are looking for but this is how I get 
> the equity curve into a csv file that I then use in Excel.
> 
> First you need to add the equity curve to your chart. Then right 
> click on it and select "Edit Formula". Then add the following code 
to 
> the botttom. 
> 
> 
> h = fopen("c:\\temp\\portfolio.csv","w");
> y = Year(); 
> m = Month(); 
> d = Day(); 
> for( i = 0; i < BarCount; i++ ) 
> {
>     ds = StrFormat("%02.0f-%02.0f-%02.0f,", 
>                      y[ i ], m[ i ], d[ i ] ); 
>       if (eq[i] > -1000000)
>       {
>         fputs( ds, fh );
>       ds = StrFormat("%02.2f,",  eq[i]); 
>       fputs( ds, fh ); 
>       ds = StrFormat("%02.2f\n",  Cash[i]); 
>       fputs( ds, fh ); 
>       }
> }
> fclose(fh);
> 
> You can change the name of the file and location. One thing to know 
> is that the symbol that is shown must have data over the entire 
time 
> of your backtest. The data file will be written whenever a new 
equity 
> curve is generated by AB.
> 
> Hope this helps,
> Cey
> 
> --- In [email protected], "Graham Johnson" <grahamj@> 
> wrote:
> >
> > I've looked through this forum and seen suggestions such as 
adding 
> a 
> > custom metric to the AA and then exporting the resultant file.  
> This 
> > would seem to require a deal of data massaging due to multiple 
> report 
> > entries for a given day, and also many trading days when there 
are 
> no 
> > report entries due to there not being a Buy or Sell.
> > 
> > The discussion on using FPUTS seems to be a good solution - but 
> that 
> > would be so much easier if one could traverse ~~~EQUITY (or any 
atc 
> > symbol) and use FPUTS to write Date and Value.
> > 
> > Is that achievable, or am I asking too much?
> > 
> > Thanks
> > 
> > Graham
> >
>


Reply via email to