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. Thanks, Howard On Jan 2, 2008 4:06 AM, bilbo0211 <[EMAIL PROTECTED]> wrote: > --- In [email protected] <amibroker%40yahoogroups.com>, > "scourt2000" <[EMAIL PROTECTED]> wrote: > > > Sounds like you're interested in John Ehlers' work on adaptive > > indicators that he explained in Chapter 22 of his book, "Rocket > > Science for Traders". He took some common momentum indicators > > (including the CCI) and coded them up to be adaptive in Tradestation > > Easy Language. > > > > Also, you can find a couple of articles about this at tuckerreport.com > > > I have Ehler's "Cybernetic Analysis for Stocks and Futures" but I am > not a programmer and I am not familiar with the languages he codes in > so I am using the Ehlers formulas in the afl library. > > The Fisher Transform seems most useful. On average, my cycle adapted > MACD triggers entry signals about one bar earlier than the Fisher > Transform. > > I have read all of Tucker's stuff. We both came to the same conclusion > that LRC is better than MA. I replaced all MA's with LRC's in my > indicators. > > Bill > > >
