series & LookBack = 0 - strange behavior?

Posted By: DdlV

series & LookBack = 0 - strange behavior? - 04/25/14 00:32

Hi jcl. I want to run some stats, plot some things, etc., w/o any trading. No indicators involved so I set LookBack=0. The code below gives an Error 046 - why? I can Ignore the Error 046 and the code executes. If I swap the comments so the 2nd series is also specified as 500 long, Error 030 results and the script does not proceed. Are either or both of these as expected?

Thanks.

Code:
function run() {
	BarPeriod	= 1440;
	LookBack		= 0;
	asset("EUR/USD");
	vars Price	= series(price(),500);
	vars Close	= series(priceClose());
//	vars Close	= series(priceClose(),500);
}

Posted By: jcl

Re: series & LookBack = 0 - strange behavior? - 04/25/14 11:51

You can't have a series of length 0 and also no series that is longer than LookBack.
Posted By: DdlV

Re: series & LookBack = 0 - strange behavior? - 04/25/14 12:39

OK... Zorro prevents neither - it just goes crazy... (Except in the 1st case with the script as above - in that case after Ignore it ran fine.)

So, if I have 12736 bars and want to have a series(es) that long, I need to specify LookBack=12736?

Thanks.
© 2024 lite-C Forums