Gamestudio Links
Zorro Links
Newest Posts
FXCM: "Can't connect to price server"
by jcl. 06/19/19 15:47
Data Execution Prevention Strikes Again
by Dooley. 06/19/19 15:38
assert
by jcl. 06/19/19 14:59
Bring the old grin back!
by Michael_Schwarz. 06/19/19 07:56
Help with calculation
by Qw3rty. 06/18/19 08:01
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
13 registered members (AndrewAMD, Kaga, JeyKey II, Dooley, Grat, kvm, alibaba, Ayumi, MatPed, 1 invisible), 632 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Qw3rty, Dal, Carson, giantj, dh85
18236 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: 128
Czech Republic
Grat Online OP
Member
Grat  Online OP
Member

Joined: May 2015
Posts: 128
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: 128
Czech Republic
Grat Online OP
Member
Grat  Online OP
Member

Joined: May 2015
Posts: 128
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: 237
Petra Offline
Member
Petra  Offline
Member

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


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