PureBytes Links
Trading Reference Links
|
That was the impression I was getting..
The reason I need an Array is because I want to look
price change sums across different events like when
a given Osc. Is O/B
-----Original Message-----
From: DH [mailto:catapult@xxxxxxxxxxxxxxxxxx]
Sent: Thursday, December 14, 2006 10:19 AM
To: Chris Evans
Cc: Omega List
Subject: Re: Arrays
You have to shift the values manually.
Var: Sum;
Array: Diff[3](0);
If Close > Close[1] then begin
Diff[3] = Diff[2];
Diff[2] = Diff[1];
Diff[1] = Close - Close[1];
Sum = Diff[1] + Diff[2] + Diff[3];
End;
If the array is large, you can use a loop to shift them one at a time
rather than typing all the shifts.
--
Dennis
Chris Evans wrote:
>
> OK so I want to add up the last 3 up close
> Differences using an array:
>
> Array:Diff[3],(0);
>
> If close>close[1] then
> Diff[1]=close-close[1];
>
> Sum=Diff[1]+Diff[2]+Diff[3];
>
> But I don't think this works.. I thought that
> an array value would slide over each time a new
> value was put in the first array location ..-
> obviously not
>
> Help(?)...
>
>
>
>
|