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

Re: using arrays



PureBytes Links

Trading Reference Links

Hans,

My problem is I am getting two sets of array values. How to avoid this ?

Thanks,

Sudarshan


hans esser wrote:

> > In my TS 4.0, I wish to load an array with the last 200 days close.
> > The code I wrote is:
> >
> > { Load an array into memory and process it }
> >
> > Array: num[200](0);
> >
> > if date >= lastcalcdate then begin
> >
> > for value1 = 0 to 200  begin
> >  num[value1] = close[value1];
> > end;
> >
> > { this code is to print what is in the array }
> > for value1 = 0 to 200 begin
> >  print(value1,num[value1]);
> > end;
> >
> > end;
> >
> >
> > { the plot statement is given only to meet the requirements of EL . Not
> > actually needed } plot1(close,"close");
>
> TRY instead
>
> if 0 > 1 then plot1(close,"close");
> {obviously this is allways FALSE and will NOT plot that}
>
> lrgds hans
>
>
>
> > Problem: I get two sets of 200 values. The first set contains 200
> > values, of the last day's close, and then the second set has the last 200
> > days close which is what I wanted.
> >
> > Why does the first set of values come and how do I prevent it ?
> >
> > Thanks,
> >
> > Sudarshan Sukhani
> >
> >
> >