# CCI – Basic understanding

The CCI, or Commodity Channel Index, has gained quite a bit of popularity over the last few years. One chat room started promoting its use. That room had a large following and still does. Several other chat rooms popped up using essentially the same formula and signals. The indicator has grown over the years to possess almost magical powers. It is touted as being a leading indicator. Somehow this indicator can take the high, the low, and the close of a price bar and somehow, through some magic of math become, or I should say, in defiance of all the rules of math, lead the function from which it is derived. Can it really do this? Further, it is said by many that this is the only indicator you need. It is so good that you don’t even need prices on the chart to trade with it.

I think the first thing that needs to be done here is to look at what this indicator really is. Maybe see if it really is a magic indicator, or if not, take some of the magic and mystery out of it. If you look at the code it only consists of a few lines.

Here’s the code:
1. Calculate the Typical Price = (High + Low + Close) / 3
2. Calculate the simple moving average item #1. We’ll call it SMATP.
3. Calculate the Mean Deviation: delta_i = abs(last_SMATP – TP_of_period_i) (for all i from 0 to N, where N is the length of a period used to calculate the SMATP). MD = sum_for_all_i(delta_i) / N
4. Calculate the CCI = (TP – SMATP) / (0.015 * MD)

On the above chart you’ll see a CCI with the input parameter set to 14 bars, which is the common setting in all the chat rooms I’ve been in. This happens to be an intra-day tick chart on the Dow mini-futures, however it could be a 5 minute chart or a daily chart, or any chart. Some traders will extend the 14 parameter out to 20 on longer term charts. Also, most CCI traders use a histogram on the CCI that changes color when indicating an uptrend or downtrend. I left it out for this article for clarity. The zero basis line is purple and the +/- 100 lines are dashed cyan. I put a pink circle on one of the more common patterns, which is referred to as a zero line reject. This occurs when the CCI bounces off the zero line. This would equate to a bounce off a 14 period simple moving average. Saying that blasphemes remark in a CCI chat room will probably get you booted, or at least you’ll receive many nasty comments. The magic indicator with its premier setup couldn’t be as simple as a bounce off of a 14 period simple moving average, could it? Let’s see.

On the above chart I have the same CCI under the prices, but this time in the upper subgraph where the normal price bars were I replaced them with a thick black line that is what is typically referred to as the typical price. This is the first line in the CCI code above. It is simply the average of the high, the low, and the close. We are already introducing a bit of lag into this leading formula. The high and low and close normally don’t occur at the same time on a normal price bar (limit moves excluded) so there is a bit of lag here, however slight it may be. The purple line is the 14 period simple moving average displayed along with the line chart of the typical price. I place the same pink circle on the CCI where the zero line reject is, and placed a circle on the price line in the same spot. You’ll notice that this line bounces off the simple moving average exactly like the CCI bounces off the zero line. Could the zero line be nothing more than a detrended simple moving average? Indeed it is. The moving average is on line #2 of the code above.

On the chart above you’ll see the same CCI in the lower subgraph. The upper chart is the same price line but this time it has been detrended. The black line is the price line, that is the line of the typical price, and the purple line is the moving average. The same moving average as in the previous example, however this time it is pulled tight like a string so the prices will skew around the moving average. It is calculated simply by subtracting the moving average from the price line. Most of the changes in direction of the price line will occur at the same time as the changes in direction of the CCI. The amplitude is somewhat different, however you should notice that the moves around the zero line are identical. I pointed out with the pink circles the one bounce off the zero line at the same time as the bounce off the moving average, which now also becomes a bounce off the zero line of the simple detrended simple moving average. I’m sure you can find many more close relationships between the two.

If I am correct in all this, which simple arithmetic proves me to be, then not only the zero line of the CCI is nothing more than a simple moving average, also the CCI line itself is nothing more than the price detrended. I thought I heard somewhere that you didn’t need prices to trade. But the CCI line is a price line, so we are looking at prices. It is price with a slight modification as each point is the sum of high, low, and close, and then divided by 3, and then skewed a bit so 70% to 80% of the prices fall within a certain range. Lambert chose rather arbitrarily to use the .015 in the denominator by eyeballing different settings until it looked like he had this percentage within the bands. You can experiment with different setting of the .015 number to see how the 100 lines change. Of course you can leave it as is and move those reference lines around to get the same effect. I just wanted to point out how arbitrary those sacred reference numbers are. I would have thought one standard deviation would have made more sense, in which case about 67% would have fallen within the boundaries.

A close approximation of the CCI can be replicated easily by the use of Bollinger Bands, which will eliminate the need for any programming as these bands are included with most software packages and can be plotted right over the price bars.

In the above chart we again have the very same CCI in the bottom subgraph, and I have returned the non-detrended typical price line along with the 14 period simple moving average. This time I added the Bollinger Bands. Again the zero line of CCI is the same as the moving average, and I color coded it so it is easier to reference. I plotted to Bollinger Bands as a dashed cyan line so it can easily be referenced to the plus and minus CCI reference lines. To make them roughly equal I had to of course use the moving average length of 14 and the price input of the typical price instead of just the closing price. I also had to change the default setting of the Bollinger Bands to about 1.25 standard deviations. If one standard deviation is about 67% and two is about 95%, I figured matching Lambert’s idea of roughly 80% containment would require about 1.25. I’m sure my estimation isn’t perfect. I wasn’t trying to get a perfect match. But you can see it is very close. So close that for all practical purposes it is the same. Just look at the excursions outside the CCI bands and then refer to the same spot on the Bollinger Bands. We’ve already established the relationship of the crosses and bounces around the zero line. Now the 100 lines are accounted for.

The added advantage of viewing the Bollinger Bands right on the prices is that you can see the trend at a glance, without having to resort to supporting indicators attempting to identify the trend and its strength. And perhaps even more important, you can see when volatility expands and contracts. Sometimes the CCI will be making nice big moves, just enough to get the CCI traders excited, but prices might not be going anywhere. Tight Bollinger Bands will show this at a glance. Of course, when the bands are tight they usually expand back out as volatility is quite cyclical. At other times the CCI might be hardly moving, but prices making large swings. This is when the bands are wide and prices, relative to the bands, are not making large moves, but in an absolute sense they are. How can you get this information from only looking at the CCI without the advantage of seeing prices?
Now what would happen if we pulled the moving average and Bollinger Bands tight like a string?

The answer is in the chart above. Yes there are slight differences. CCI purists will say they are not at all the same. One uses mean deviation and the other standard deviation, and my parameter for standard deviation was done with a quick eyeball. But I think most rational technicians would say they are derived from the same basic concept, and despite the slight differences, one cannot say one is better than the other.

I may sound critical of the CCI, but I am not. I am critical of the promotion. I think it is a fine indicator, and one that can be made a lot better, which I will deal with in the next article. And the article after that will deal with application. I’ve only dealt with basic construction and understanding. To fully understand this indicator we need to deal with what is being measured, and the possible uses of those measurements. I don’t think it serves any purpose to blindly call any indicator a magic, leading indicator – the only indicator you need to trade, just because people in a chat room build it up to be something that no indicator can possibly be.

## 14 thoughts on “CCI – Basic understanding”

1. Ralph says:

excellent explanation. glad someone has knocked it off a pedestal.

2. De Niro says:

This article was werry interesting. Thank you for shering youer work with us.

3. Mike says:

Thanks a lot for this nicely provided explanation of one ‘magic’ system based on ‘leading’ indicator. I have really learned a lot from this article!

4. WCCI says:

Whatever is true is true for you !

5. ngula says:

Hi,

I think you guys are all a bit too critical of wcci. As you are all saying yourselves, the ONE indicator is actually made up of a number of others: MA’s, BB CCI, etc. Woodie has simply identified patterns which indicate entry, when all the indicators are in agreement.
In actula fact, you guys are knocking the indicator, not the man. Go to any other site, and you will find indicators being rubbished.

Regards.
Ngula

6. thks! pls tell me that how many indicator in your chart?

7. Lon Henderson says:

On my own (with a little help from another trader) I have been using cci for several months. I am unfamiliar with Ken Wood so have no comment on his methods. Your explanation of cci is excellent in my opinion and your criticisms ring true in my experience.
I have definitely made money using cci, but on the wrong day, it can mislead you down the wrong path. So, for me, it is just part of the big picture approach I try to use. So, in the category of fwiw, I use Bollinger Bands, generally set on 20 period with a 3 deviation. (However, on the things like SSO or QLD, a 2 deviation appears better.) A 67sma (dunno where that one originated or how that can be dissected) has been a very useful line on a chart too. When the 67 and a Bollinger edge line up, that can be pretty good support or resistance in my experience. And then, I have cci on a 14 period ( but after reading this, I will spend more time tweaking that) I have found ZLR to be mostly useless. cci is a nice simple line to identify a possible pattern, imo.
I try to keep it simple (no doubt a comment on my own IQ). And finally I look for basic patterns. Put all these things together. If I get several indicators to line up, I stick money into the trade.
Frankly, these indicators are just tools, like cutting a board with a power saw; you have to measure, use a straight edge, pencil to mark the line and finally saw. Use tools in conjunction with each other. What is really tough is what is going on between your ears and that is where my real battle never ends.

8. Thanks for demystifying the cultist BS around CCI.

9. Craig says:

Doug, you’re a bitter idiot. It’s about making money, stop taking it personal just because some people like an indicator other then your favorite.

10. Cci can capture average velocity of a trend but not acceleration which is captured by MACD histogram.

11. Chuck Jacobs says:

I followed Ken Wood’s website for years, bought his DVDs, did the whole thing. It’s pure garbage.

12. Sodhan says:

Any indicator even ccl are useful in a zig zag trend not in uniformed angle trend.Zig Zags are indicating long term investors not confident fine riding trends long term investors float above five month average.Let cci be used by swing traders with short term view not exceeding a month.