[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: Wednesday, January 07, 2004 7:45 AM
> To: omega-list@xxxxxxxxxx
> Subject: Cycle Length
>
>
> I thought I'd try to use the ehlers cycle length idea to create a varying
> term oscillator .. so the idea is to find the number of periods
> you have to
> go back in time until you reach the condition where the sum of
> the closes or
> the sum of (high+low)/2 =0 ..
>
> firstly I figure that + or - 1% will do since it will never sum
> to exactly=0
> .. so I wrote
>
> If Summation(Price, Len) <.01*Price and Summation(Price, Len) >-.01*Price
> then
>   Cyclelen=len else len=len+1;
>
> which doesn't work   .. clearly I need a loop  .. any ideas?
>

Chris,

I think that you'll need to first detrend the data, and generally you'll
need to do that over an interval that is at least twice the cycle length.
And then generally you should probably just take the minimum sum, rather
than using some fixed percentage. An easy way to detrend is to just take
the average of the first point in the series, and the last point and
subtract
it from each point. More elabote would be to run a least squares line fit
through the data, and then subtract the best fit line value from each point.