Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
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
1 registered members (rki), 405 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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