Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (flink, AndrewAMD, TipmyPip, 1 invisible), 667 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
about series #477150
05/24/19 13:39
05/24/19 13:39
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Hi,

Anybody know, where is mistake?
Code:
function run(){
	vars n;
	int i;
	if (is(INITRUN)){
	for (i=10;i<16;i++)
		n=series(i);
	
	for (i=0;i<5;i++)
		printf("n%f .. %d",n[i],i);
  
	}
	
}

and output is:


test compiling................
15.000000 .. 0
15.000000 .. 1
15.000000 .. 2
15.000000 .. 3
15.000000 .. 4
Test: test EUR/USD 2014..2019



I would expect in the variable "n" value from 10 to 15

Thanks Milan

Re: about series [Re: Grat] #477151
05/24/19 13:49
05/24/19 13:49
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
with the dynamic series working:
Code:
function run(){
	//readActual();
	//loadVol();
	//TestActual();
	vars n=series(0,-5);
	int i;
	if (is(INITRUN)){
	for (i=10;i<16;i++)
		shift(n,i,5);
	
	for (i=0;i<5;i++)
		printf("n%f .. %d",n[i],i);
  
	}
}

output is:


test compiling................
15.000000 .. 0
14.000000 .. 1
13.000000 .. 2
12.000000 .. 3
11.000000 .. 4
Test: test EUR/USD 2014..2019



Question is: is a possible init series before start trading int the INITRUN?

Thanks

Re: about series [Re: Grat] #477155
05/25/19 06:08
05/25/19 06:08
Joined: Apr 2008
Posts: 586
Austria
Petra Online
Support
Petra  Online
Support

Joined: Apr 2008
Posts: 586
Austria
No because the manual says that series are created after the first run. I think in the initrun they have some dummy pointer.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1