--- 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
