vars series in function

Posted By: Grat

vars series in function - 07/25/16 12:06

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
Posted By: jcl

Re: vars series in function - 07/25/16 13:48

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.
© 2024 lite-C Forums