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

Re: LastBarOnChart seems to execute more than once



PureBytes Links

Trading Reference Links

Thanks to Dennis and Bill Brower for replying.
(Ok, this is a bit of a complex topic.)

The short answer is that 

(1)any system logging function will generate one additional call
(hence one more print statement) when the chart is redrawn with the
best results.
(2) Another line is generated when the optimizer sorts the results and
selects the best result.
(3) Another, 3rd call is made to the strategy, hence to the the print
function when the strategy is INSERTED into the window.

There is more to the issue than the summary, 
but just be careful when collecting performance 
statistics using custom calculations.

Leslie


DH wrote:
> 
> > If I step a parameter from 30 to 50 in steps of 20, I expect TWO runs
> > and two lines.
> > However, I find FOUR lines in the .csv file.
> 
> I'm not sure what's going on with the four lines. You already have the
> chart open when you delete the file, right? If so, I would expect three
> lines, the two for the optimization and then a third when it redraws the
> chart with the best value. Something sure looks screwy with the output
> values. Try hard coding your function code into the signal and see if
> that will get it down to three lines that make sense, i.e. correct
> numbers for all vars with the best run printed again at the end.
> 
> --
>   Dennis

-- 
Regards,
Leslie Walko
610-688-2442
--
 "Life is a tragedy for those who feel, a comedy for those who think"
	Horace Walpole, 4th earl of Orford, in a letter dated about 1770