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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 7th_zorro), 923 guests, and 3 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
vars series in function #461094
07/25/16 12:06
07/25/16 12:06
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,

i have question. I have function ( fragment )

Quote:


function runLongJD_P1(){
....
....
vars aOpen = series(priceOpen());
....
}


variable aOpen is created every call function and fill all data? Or only add new value ( in the samble add new open price)

I'm mean:
a) initialization - first call function
series aOpen is filled all know data depend the LookBack
Only with the first calling.

b) Run calling - every new calling ( depend the BarPeriod ) shift array and on aOpen[0] add the new value.

Is a true?

Thanks Milan

Re: vars series in function [Re: Grat] #461097
07/25/16 13:48
07/25/16 13:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
If you do not explicitely call asset() in your script, the initial value of priceOpen() is 0 and therefore the series is filled with 0 upon first call. Afterwards the current price is added and shifted once per bar.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1