--- In [email protected], "Howard B" <[EMAIL PROTECTED]> wrote: > For this statement: > somevar = CCI(parm); > "somevar" will be an array with one element for every bar of the data array, > the value of that element the result of applying the CCI function to the > "average" of that bar ((H+L+C)/3), for the lookback length of "parm". > > What problem are you trying to solve? >
I want parm to be an array. What I am doing is trying to 'tune' the CCI to the dominant cycle in the market. Let me give you a simplistic example using moving averages. If you are trading a trending market (longer period dominant cycle), you want a longer period moving average to filter out the small (high frequency) corrections that occur. In a trading range market (shorter period dominant cycle), you want a shorter period moving average that can react more quickly to the shorter term changes in direction. I started by using the fft to estimate the dominant cycle but I had a lot of trouble coding something useful so I switched to Ehler's estimate (using Laguerre filter, it's in the afl library). As crude as that estimate is, it improves the performance of the indicators I tried it on. If I could get a more accurate measure of the dominant cycle, I am confident it would improve performance even more. That's why I want the period of the CCI to vary. I also don't see any point to include the C of a bar for intraday charts. I use CCIa((H+L)/2,period). Bill
