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

Array of Data2



PureBytes Links

Trading Reference Links

Gary and Robert,

	Thank you for directing this question to me for attention.  I am giving an
Easy Language Workshop this weekend and I shall use the reply with my
students.

On Feb. 16,  9:40pm, Gary Funck wrote:
> Subject: arrays question - data association?
> 
> In the Omega TS4 Easy Language User's Guide, p 113, it shows
> an array declaration of the form:
> 
> Array: MyArray[20] (0, Data2);
> 
> and says that this indicates that MyArrary will hold data from
> the Data2 series.  What does that mean?  When would this
> construct be used?

in the array declaration the number in square brackets defines the upper
limit.  Realize that the array starts with element zero (0) so the array
declared above actually has 21 cells (0..20).  

The value in parenthesis (0) serves two purposes :  First, it defines the
type (Numeric, Boolean, String) of the data structure.  Second, it causes
Easy Language to fill all the cells of the array with the value, in this
example zero, immediately prior to executing the first bar of data.

When you specify a data series (0, data2) this causes any references to the
value of a cell to be bound to the time series of Data2.  In other words,
if Data1 is daily data and Data2 is weekly data the reference "MyArray [2]
[1]" refer to the value stored in the third cell (0, 1 and 2) for the
previous week ([1]).

It is extremely unusual to refer to previous values of an array.  I make it
a practice to fins an alternative solution as the size of the array is
immediately multiplied by the value of MaxBarsBack.  An array declared with
20 elements and MaxBarsBack of 50 jumps from 21 cells to 1050 cells.  It
can instantly take up an unconscionable amount of memory.

Samuel


    Samuel K. Tennis,  VISTA Research and Trading, Inc.
    8103 Camino Real C-409       voice: 1(305) 273-1321
    S. Miami, FL  33143            fax: 1(305) 273-9164
    skt@xxxxxxxx               http://www.gate.net/~skt