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

Results of Optomization to CSV file



PureBytes Links

Trading Reference Links

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?