Skip to content
Indicators 6 min read

Commodity Channel Index (CCI): Calculation and Reading

The commodity channel index compares typical price with its average, scaled by mean deviation. See the CCI formula, a worked example, the ±100 lines and limits.

Hypothetical daily candlestick chart with a 20-session commodity channel index pane: CCI rises above +100 in the first advance, peaks lower at the later higher price high and falls below -100 in the decline.Higher price high1000-100CCI(20)
Hypothetical bars, not market data. CCI(20) is computed from these bars. The second, slower advance sets a higher price high but a lower CCI peak, a bearish divergence, before the decline takes CCI below -100.

CCI measures how far the typical price sits from its recent average, in units of the average absolute deviation. The ±100 lines mark unusually large deviations for that stock, not fixed overbought or oversold prices.

What the commodity channel index measures

The commodity channel index (CCI) measures how far a session’s typical price sits from its recent average, relative to how far prices usually stray from that average. Donald Lambert introduced it in Commodities magazine in October 1980 to identify cyclical turns in commodity prices, and it is now applied to stocks and other markets as well. Despite the name, nothing in the formula is specific to commodities.

CCI has no units and no fixed bounds. Lambert chose a scaling constant of 0.015 so that roughly 70 to 80 percent of readings would fall between -100 and +100; the share for a particular stock and lookback can be quite different.

Commodity channel index calculation

CCI takes four steps: the typical price, its simple moving average, the mean deviation around that average and the final ratio. The first value needs n sessions.

Typical price (TP) = (High + Low + Close) / 3
SMA = average of the last n typical prices
Mean deviation = average of |TP(i) - SMA| over the same n sessions
CCI = (TP - SMA) / (0.015 × Mean deviation)
n
The lookback in sessions; 20 is a common default and 14 is also used.
|x|
The absolute value of x.
0.015
Lambert’s scaling constant.

Edge case: if every typical price in the window is the same, the mean deviation is 0 and so is the numerator, so CCI becomes 0 / 0, which has no defined value. Platforms handle this differently, for example by showing 0 or by leaving the session blank.

CCI mean deviation calculation

Mean deviation is the step most often done wrong. Every deviation in the window is measured from the current SMA, the one computed at the latest session, not from the average each older session had at its own time. The deviations are taken as absolute values, so they never cancel out, and then averaged.

Mean deviation at hypothetical session 7: every deviation is measured from that session’s SMA of $20.44
SessionTypical priceDeviation from SMAAbsolute deviation
320.00-0.440.44
419.90-0.540.54
520.30-0.140.14
620.70+0.260.26
721.30+0.860.86
Average20.440.448

Mean deviation is not the standard deviation used by Bollinger Bands: it averages absolute distances instead of squaring them, so a single outlier weighs less.

Worked example with a five-session window

To keep the table short, this hypothetical example uses n = 5; the steps are identical with 20. The first CCI value needs 5 typical prices, so it appears at session 5.

CCI with n = 5 over ten hypothetical sessions (prices in $)
SessionHighLowCloseTypical priceSMA(5)Mean deviationCCI(5)
120.4019.8020.1020.10
220.5019.9020.2020.20
320.3019.7020.0020.00
420.2019.6019.9019.90
520.6020.0020.3020.3020.100.120111.1
620.9020.3020.9020.7020.220.224142.9
721.6020.8021.5021.3020.440.448128.0
821.8021.2021.5021.5020.740.52896.0
921.5020.8021.0021.1020.980.38420.8
1021.1020.4020.6020.7021.060.288-83.3

Session 5 shows how sensitive CCI is after a quiet stretch: the typical price is only $0.20 above its average, but the mean deviation is just $0.12, so CCI reaches 111.1.

CCI overbought and oversold interpretation

Readings above +100 mean the typical price is unusually far above its recent average for that stock, and readings below -100 unusually far below. Lambert’s original guidelines focused on moves beyond these two lines as the start of strong moves, while many chart readers today call the same zones overbought and oversold, or watch ±200 for more extreme deviations.

The two readings lead to opposite habits, so decide which question you are asking. A strong trend can hold CCI above +100 for many sessions, and in that case an overbought label describes strength rather than an imminent turn. In the example, CCI stays above +100 for 3 sessions while the typical price keeps rising.

CCI zero line crossover explained

CCI crosses zero exactly when the typical price crosses its own simple moving average, because the numerator changes sign while the denominator stays positive. A zero cross is therefore the same event as price crossing a moving average of typical price, only scaled differently.

In the example, CCI moves from +20.8 at session 9 to -83.3 at session 10 as the typical price drops below its 5-session average.

CCI divergence on stock charts

A CCI divergence compares the oscillator’s swings with price swings over the same sessions. A bearish divergence pairs a higher price high with a lower CCI high, and a bullish divergence pairs a lower price low with a higher CCI low. Because the denominator expands when prices become more volatile, a divergence can come from a change in volatility as much as from a change in momentum, so check both.

The illustration in this guide shows a hypothetical bearish divergence: the second advance sets a higher price high, but it is slower than the first, so the 20-session CCI peaks lower. The decline that follows takes CCI below -100.

How to read the commodity channel index on a stock chart

Plot CCI below price with lines at +100, 0 and -100. Read the zone first, then the direction and the path: a reading that spends many sessions above +100 describes a persistent strong move, while one that pokes above and immediately falls back describes a brief spike. For each crossing, check the price bars and ask whether it came from a large move or from a quiet window that shrank the mean deviation.

Limitations of the commodity channel index

CCI is a normalized distance from an average, and its weaknesses follow from that design. Keep these limits in mind when reading it.

  • It is unbounded, so there is no fixed extreme; ±100 and ±200 are conventions.
  • Quiet periods shrink the mean deviation and inflate readings, as at session 5 of the example.
  • Different lookbacks and different handling of the 0 / 0 case produce different values across platforms.
  • Trends can hold CCI beyond ±100 for a long time, so overbought and oversold labels can describe strength rather than exhaustion.
  • It summarizes past sessions and does not predict the next one.

CCI is usually computed on daily bars and updates once per session. TradeClever’s Stock Charts do not plot CCI; they plot RSI and MACD panes and Bollinger Bands, which describe related ideas of momentum and distance from an average.

Sources

  • Donald R. Lambert, “Commodity Channel Index: Tool for Trading Cyclic Trends,” Commodities magazine (October 1980)

Read our data and methodology notes for calculation context. This guide explains research tools and observations. It does not recommend a trade or investment.

Follow your curiosity

One good question leads to another.

All guides
Make room for better research

Put your curiosity to work.

Build a scan with filters or CleverScan rules. Explore the results. Find your next idea.

Open a stock chart