Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (EvanTJ, JeyKey II), 8,888 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Working with series inside arrays #454853
09/25/15 15:43
09/25/15 15:43
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
I have define the next array

vars Band_Array[50];
int i;
for(i=0;i<50;i++){
Band_Array[i] = series(BandPass(Price,i+10,0.5));
}

It works fine.
The problem is that I dont know how to extract any values from that array like Band_Array[0][1].
Any ideas?

Last edited by Nanitek; 09/25/15 15:44.
Re: Working with series inside arrays [Re: nanotir] #454854
09/25/15 15:47
09/25/15 15:47
Joined: Sep 2013
Posts: 64
Spain
yosoytrader Offline
Junior Member
yosoytrader  Offline
Junior Member

Joined: Sep 2013
Posts: 64
Spain
Hi Nanitek,
it's a long time that I don't code in Zorro,
but I would say

Band_Array[0] is last's bar value,
Band_Array[1] is previous bar value, .. and so on

hope it's like this


Happy trading laugh
Re: Working with series inside arrays [Re: yosoytrader] #454857
09/25/15 16:59
09/25/15 16:59
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
Not really
Band_Array[1] is the series with i=1 then series(BandPass(Price,1+10,0.5));
I know it, because I can plot all of them.

Re: Working with series inside arrays [Re: nanotir] #454868
09/26/15 15:08
09/26/15 15:08
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
Finally I found way to extract the value of the series inside the array.
Firsy I defined an Array where each component is a series()

Quote:
vars Band_Array[60];
int i;
for(i=0;i<60;i++)
Band_Array[i] = series(DominantPeriod(Price,i+10));

So then Band_Array[0] is a series with i=0
My problem was how to extract just a component of the series so that I can get some information from it.
And this is the way

Quote:
int i;
var PD[60];
for(i=0;i<60;i++){
vars r = Band_Array[i];
PD[i]=r[0];}

So then PD[0] is the value of Band_Array[0] at Price[0]

Last edited by Nanitek; 09/26/15 15:09.

Moderated by  Petra 

Gamestudio download | 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