You might consider using the built in FFT to get the dominant cycle. It is 
much faster than Laguerre or other similar calcs.

I have not compared the two for accuracy. I am sure they are both error 
prone based on how pure a cycle is at any given time.

Ara

----- Original Message ----- 
From: "bilbo0211" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, January 02, 2008 11:45 AM
Subject: [amibroker] Re: Is there a way to get CCI to accept an array for 
periods?


> --- In [email protected], "Howard B" <[EMAIL PROTECTED]> wrote:
>>
>> Hi Bill --
>>
>> If I understand correctly, you are first calculating the length of the
>> period you want to use for the CCI, and you want to base the CCI for
> that
>> bar on that period.
>>
>> It looks like you have two options:
>> 1.  Follow the suggestion of Murthysuresh in an earlier post.  That is,
>> precalculate all the CCIs you are likely to want and pick the value
> of the
>> one you need when you know the length.
>> 2.  Write your own calculation of CCI as a function using a loop.  The
>> inputs to the function include the length and whatever you want for
> price --
>> C, (H+L)/2, whatever.
>
> Yes, you understand correctly. I had not considered the 1st option but
> in either case it will be slow because the Laguerre filter estimate of
> the Dominant cycle is slow already, adding code will only slow it down
> more. There is a several second delay when loading the Dominant cycle
> indicator on a 2 minute chart.
>
> That is why I asked about a way to calculate it with built in
> indicators. From experience, I know the that using loops is slower
> than the built in arrays.
>
> If you consider that I am anticipating using multiple indicators on
> multiple time frames monitoring multiple markets, performance is
> likely to be an issue.
>
> Bill
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 

Reply via email to