[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: Monday, January 12, 2004 12:04 PM
> To: Gary Funck
> Cc: omega-list@xxxxxxxxxx
> Subject: Re: Cycle Length
>
>
> so the XAvg solution is something like this:
>
>     Inputs:Price(numeric),Max(numericsimple);
> Vars:len(1),Min(1000),Save(10);

You've got Min and Save mixed up. In my suggested rewrite
Min is the actual Min, but you need another variable to hold
the current calc. I called it Sum_of_Chg or something like that.
Also, I suggested checking for LEN=5 so you don't have to worry
about the starting value for Min cha Cyclelen.

> For Len=5 to Max begin
>  Min=XAverage(price,Max)-XAverage(Price,len);

Above, you want to take the difference between a short length and
a long one, and then you want sum those differences:

   Sum_Chg = Summation(XAverage(price,3)-XAverage(Price,100), Len);

The values plugged into XAverage are fixed so as to cut of high frequency
noises, and longer term cycles/trends.


>  If AbsValue(Min)<Save then begin
>   Cyclelen=len;
>   Save=AbsValue(Min);
>   end;
>   end;
> .. but there is an error somewhere since this gives a result of 5
> .. always
> I did work with my close-close[1] but there is way too much - noise as you
> anticipated
>