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

Re: Fw: Results of Optomization to CSV file



PureBytes Links

Trading Reference Links

Peter Gibson wrote:
> 
> Thanks for the insight...any ideas for a work-around?
> 
> One idea I had was to compare the value of the parameters from the last time
> the lastbaronchart condition was met.  However on each optomization all
> variables are reset so I think I would have to use global variables.
> 
> Anyone have any more elegant ideas for writing optomization results to a CSV
> file without the result of the last optomization showing up twice?
> 
>  -----Original Message-----
> From: Bill Vedder <bved01@xxxxxxx>
> To: Peter Gibson <Peter_Gibson@xxxxxxxxxxxxxx>
> Cc: omega-list@xxxxxxxxxx <omega-list@xxxxxxxxxx>
> Date: August 21, 1998 6:51 PM
> Subject: Re: Results of Optomization to CSV file
> 
> >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
> >
> >
> >
> >

Peter,

This problem is a little more complicated than I first thought. TS does 
do an additional test over and above what you request thru the 
optimization feature (at least that's the case when optimizing a single 
input). However, instead of simply repeating the last test in the 
optimization series, it appears TS repeats the optimization for the 
"best" (whatever you've defined as "best") run.

You'll have to add code to your system so that it remembers the parameter 
value for the "best" run then some more code to test for that value when 
doing your print statement. 



Regards,
Bill Vedder