[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Results of Optomization to CSV file



PureBytes Links

Trading Reference Links

Peter Gibson wrote:
> 
> I am attempting to send results of optomization directly to a CSV file.
> This is the code I am using just to see if I can get the thing to work:
> 
> If LastBarOnChart then begin
>      NP=NetProfit;
>      FileAppend( "d:\data\xtra\equity.csv",
>      Sym+","+
>      numtostr(Date,0)+","+
>      numtostr(Param1,0)+","+
>      numtostr(Param2,0)+","+
>      numtostr(Param3,0)+","+
>      numtostr(Param4,0)+","+
>      numtostr(Param5,0)+","+
>      numtostr(NP,0)+","+
>      newline);
> end;
> 
> Works OK except for the last value of the optomization the line is printed
> twice - so for each future I get an extra line - any ideas?

Peter,

Your code is fine. For some reason TS repeats the final optimization run 
in a series. If you specify to test PARAMETERX from 1 to 5 by 1, you'll 
see that TS will perform 6 runs, not 5 as you'd expect.

Maybe some of the experts can comment as to why this happens. Or maybe 
some of the Omega folks can comment.

Regards,
Bill Vedder