There are probably more clever ways to do this, but the loop below
generates an array X = 1, 2, 3 . . .
// Create/Load the X (day bars) data array;
X[0] = 0.00;
for ( i = 1; i < SlowPers; i++ ) // Create largest array needed -
SlowPers;
{
X[i] = X[i-1] + 1.00 ;
}
--- In [email protected], "aleskresta" <[EMAIL PROTECTED]> wrote:
>
> Greetings,
>
> I am still a little bit confused about arrays in AB, could someone
> give me an example of one simple thing:
>
> 1)I have an array of Close prices
> 2)I want to create an array(the same length as first) of a number
> 1,2,3, nad so on
> 3)I want to compute covarience between array 1 and array 2, and
> variance of array 2
>
> Because I am confused about arrays I don't know how to do the second
> thing
>
> Thanks a lot for advice
>