Function Storage

Questions about MultiCharts and user contributed studies.
janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Function Storage

Postby janus » 16 Jun 2009

If in a function I have a statement like this:

Code: Select all

v = low[n] of data(basedatanumber);
what should I set the Function Storage to? Auto-detect, Simple or Series? My indicator behaves differently for Simple and Series.

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 13 times
Contact:

Postby RobotMan » 16 Jun 2009

Mark Jurik wrote a paper on this many years ago:
http://www.jurikres.com/down/Some%20Pro ... nguage.pdf

Hope that helps.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Postby TJ » 16 Jun 2009

Mark Jurik wrote a paper on this many years ago:
http://www.jurikres.com/down/Some%20Pro ... nguage.pdf
Hope that helps.

thanks for posting the paper.
you are full of resources.

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Postby janus » 17 Jun 2009

Thanks Rob, that doco explains clearly how functions work with EL. I must admit though I'm not use to this odd way variables and functions are treated. I'm use to other programming languages like VB and FORTRAN. I can see why it's done this way but it does require more time to think and make sure the right settings and variable types are used. Call me old fashioned but I prefer the normal way as it avoids confusion in very complex programs. I suppose I'll get used to it.

Anyway, after reading the doco, the answer to my own question is either will work since I'm not referring to any historical user defined variables within the function, but Simple is better as it uses less resources.

Also, if I wanted to pass a numeric variable as a parameter I need to define it as NumericSeries in order to refer to past values but still can define the function as Simple (I think).

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 13 times
Contact:

Postby RobotMan » 17 Jun 2009

Janus said:
Thanks Rob, that doco explains clearly how functions work with EL.
Your Welcome!

TJ said:
you are full of resources.
I'm full of something
:)


Return to “MultiCharts”