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

EasyLanguage Questions



PureBytes Links

Trading Reference Links

Hello,

Is there a way to reference inputs with array indices?
For example, if I have inputs:

   Inputs:
   CloseS1(c data1),
   CloseS2(c data2),
   CloseS3(c data3),
   {...}

Would there be some way to reference the value of the
close of the current bar for data N, say, with MyArray[N]?

Right now the only way I seem to be able to do this is:

   Array: MyArray[10](0);

   MyArray[1] = CloseS1;
   MyArray[2] = CloseS2;
   {etc,}

So that MyArray[N] then refers to the current bar's close
for data N.

Also, you can reference the value of a variable at a
previous bar, correct? So, a second question: with the
above construct, can I reference the close of data N,
say, 3 bars ago, with MyArray[N][3]? Or is there some
other way to do that?

Finally, does anyone know of a good way to pass in
a variable number of inputs to an indicator? Right
now I'm doing things such as:

   Inputs: N(2),
           CloseS1(c data1),
           CloseS2(c data2),
           CloseS3(c data3),
           CloseS4(c data4),
           {...}

And then changing the value of N in my chart depending
on how many data series I actually want to use.

Just wondering how much expressive power EasyLanguage has,
and what I need to work around ...

Any help or feedback is very much appreciated!

Brian