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

RE: Cycle Length



PureBytes Links

Trading Reference Links


> -----Original Message-----
> From: Chris Evans [mailto:evanscje@xxxxxxxxxxxxx]
> Sent: Tuesday, January 13, 2004 8:58 AM
>
> this horse still isn't drinking .. I wrote:
>
> Inputs:Price(numeric),Max(numericsimple);
> Vars:len(1),Min(99999),Save(10),Sumofchange(0);
> For Len=5 to Max begin
>  Sumofchange=Summation(XAverage(price,3)-XAverage(Price,100),len);
>  Min=XAverage(price,Max)-XAverage(Price,len);
>  If AbsValue(Min)<Save then begin
>   Cyclelen=len;
>   Save=AbsValue(Min);
>   end;
>   end;
>
> but I don't know what to do with this Sumofchange variable??
>

Vars: Len(0), Min(0), Sumofchange(0);

For Len = 5 to Max begin
  Sumofchange = AbsVal(Summation(XAverage(Price,3)-XAverage(Price,100),
Len));
  If Len = 5 or Sumofchange < Min then begin
    Cyclelen = Len;
    Min = Sumofchange;
  end;
end;