Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, 7th_zorro, ozgur, Quad), 841 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
series & LookBack = 0 - strange behavior? #440394
04/25/14 00:32
04/25/14 00:32
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
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);
}


Re: series & LookBack = 0 - strange behavior? [Re: DdlV] #440416
04/25/14 11:51
04/25/14 11:51
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You can't have a series of length 0 and also no series that is longer than LookBack.

Re: series & LookBack = 0 - strange behavior? [Re: jcl] #440426
04/25/14 12:39
04/25/14 12:39
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
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.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1