[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Series vs Simple functions/indicators



PureBytes Links

Trading Reference Links

David,

>>1) If I don't specify a setting, TS will decide whether my function 
should
be series or simple by how I access my variables AND functions correct?<<

Yes, but it's not 100% foolproof.  I never  use the "auto-detect" option.

>>1a) If my code references a SIMPLE function with the []'s, my code will 
be
labeled Series. If my code references a variable with []'s, my code will be 
labeled
Series. If neither 1a or 1b are met, my code will be labeled Simple.<<

Yes on all three.

>>2) The only difference in having my function/indicator labeled as Series 
is
that it requires more storage since it saves "an array" of the values so
that it can pull them up via []'s in future bars.<<

NO.  In addition, all type series functions inside your indicator/system 
are evaluated BEFORE the rest of the code in your indicator or system is 
evaluated.  This is done to guarantee that type series functions are ALWAYS 
evaluated on every bar, and not conditionally evaluated within an IF 
statement.  This explains why type series functions do not accept locally 
evaluated variables as input.  For example ...

	x = 5 + close ;
	y = xaverage ( x , 10 ) ;

Will be rejected because xaverage is a type series function and the value 
of x is not known a priori to calling this study.

>>2a) These automagic arrays are of size MaxBarsBack.<<

No.  They are circular buffers of size MBB+1.

>>2b) Does it store an array for EVERY variable and EVERY function my code
references or just the ones I use []'s on?<<

Every variable.  Pretty wasteful, huh?  If Omega had their act together, EL 
should let you declare each variable as type simple or series.  That would 
save a huge amount of memory, as well as operate faster (because no 
circular-buffer management overhead would be running on the type simple 
variables.

>>2c) The only disadvantage to having code labeled as Series is that it 
takes
up more memory and speeds your aquaintence with the unfortunate 64K limit.
True?<<

No.  See my answer to #2 above.

- Mark Jurik

*******************************************
Low-Lag Indicators @ Jurik Research
http://www.jurikres.com
*******************************************