Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by 3run. 09/19/19 09:42
Any chance of PBR materials with A8?
by Quad. 09/18/19 18:00
Sierra Chart Plugin
by AndrewAMD. 09/18/19 14:03
3d model editor
by karmacomposer. 09/18/19 13:18
Can MED export to FBX?
by karmacomposer. 09/18/19 13:07
I cannot get the A8 game engine to show anything
by karmacomposer. 09/18/19 12:38
Script, Start Trading Immediately
by jcl. 09/18/19 08:38
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
12 registered members (Ayumi, 3run, AndrewAMD, Quad, saulius, 20BN, kvm, MatPed, 3 invisible), 613 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Dark_Light, oxygenjoe, web20tpo, tarekhazem, Juanjo
18290 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: 163
Czech Republic
Grat Offline OP
Member
Grat  Offline OP
Member

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

Joined: May 2015
Posts: 163
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: 253
Austria
Petra Offline
Member
Petra  Offline
Member

Joined: Apr 2008
Posts: 253
Austria
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