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

Re: Easy Language Questions



PureBytes Links

Trading Reference Links

At 4:21 PM -0400 8/10/99, JAHunter wrote:

>I am new to EL.  Need to remember values calculated on back bars so as not
>to slow down the program.  I looked into the EL manual and Sam Tennis's book
>but somehow could not find answers.  Maybe they're elementary.
>
>Would somebody be able to clarify the following issues (I am using TS4):
>
>(1) What is the scope of EL variables and arrays? On the present bar only or
>are they remembered from one bar to the next?
>
>Example:
>
>Bar=1    All variables, arrays are initialized and some get new values.

Variable are initialized to the value specified in the "Vars" 
statement prior to CurrentBar = 1 and only then.

>
>Bar=2    Do variables, arrays start out with the values calculated one bar
>ago,

Yes.

>
>Or are they initialized again with their default values?

No

>
>Said yet another way, if I want to increment Var1 by 20 every bar, can I
>write
>
>   Var1 = Var1+20  ?

Yes. That is commonly done.

>
>(2) If the scope of variables/arrays is the present bar only, I assume a
>global variables DLL is the only solution to my problem.  What is the best
>DLL available for passing arrays from one bar to the next bar, and also from
>one window&indicator to another window&indicator?  For the moment, unless
>the 64K limitation is an issue (see question below), I would rather keep the
>logic in EL and use the DLL just to pass values.

Arrays work the same as all variables and retain their values from 
the previous bar.

>
>(3) 64K limitation.  Does the size of a system include all invoked
>functions? If not, I would think that one could parcel out all calculation,
>entry and exit logic to functions and have the system only keep track of
>actual entries and market position.  I am not talking about included
>systems, just perhaps more elaborate calculation, entry and exit logic than
>64K can accomodate.

Functions are included in the 64K limit but "Include Systems" are not (I think)

>
>I appreciate your help.
>

Try looking at the code for built in functions to see how variable are used.

Bob Fulks