Question about EL evaluation of heavy functions.

Questions about MultiCharts and user contributed studies.
jek
Posts: 163
Joined: 24 Dec 2006
Been thanked: 2 times

Question about EL evaluation of heavy functions.

Postby jek » 17 Mar 2009

My understanding is that in order to guarantee proper behavior of indicators that EasyLanguage will call "series" functions at the end of the indicator code if those functions have not been called explicitly as part of the code.

For example, if you have:

Code: Select all

Input: Length(10);
Var:   Flag(1);
Once (CurrentBar = 1) Begin
  Flag = 0;
End;

If Flag = 1 Then Begin
  Plot1(Xaverage(Close, Length));
End;


This will not plot anything but XAverage will be called on every bar.

First, is my understanding correct?

Second, if this is the case, is there any way to choose among several calculation methods in an EL program and not have them all get evaluated?

Or do you have to create a separate indicator for each choice?

Return to “MultiCharts”