What is the CCI indicator?

The Commodity Channel Index is a momentum oscillator. Donald R. Lambert presented it in Commodities magazine in 1980 to find cyclical turns in commodity prices. Despite the name, traders use it on stocks, ETFs, futures, forex and crypto, on any timeframe.

It answers one question: how unusual is the current price compared with its recent average? A reading near zero means price sits close to its average. A reading of +100 means it sits well above it, by an amount Lambert scaled so that most readings, roughly 70% to 80%, fall between −100 and +100. Readings beyond those lines are the unusual minority.

Unlike the RSI and the stochastic oscillator, which are locked between 0 and 100, CCI has no upper or lower limit. In a strong trend it can reach +200 or +300, so there is no level at which price "has to" turn.

CCI formula, with a worked example

TradingView computes it for you, but the steps explain how it behaves. With the default length of 20 they are in the list below.

Mean deviation is the average distance of each typical price from the average, ignoring the minus signs. With only four values for brevity, typical prices of $49, $50, $51 and $50 average $50; the distances are $1, $0, $1 and $0, so the mean deviation is $0.50.

Hypothetical worked example: a candle has a high of $51.90, a low of $51.10 and a close of $51.50, so its typical price is ($51.90 + $51.10 + $51.50) ÷ 3 = $51.50. The 20-candle average of the typical price is $50.00 and the mean deviation is $0.80. CCI = ($51.50 − $50.00) ÷ (0.015 × $0.80) = $1.50 ÷ 0.012 = +125. Price sits above its average by more than the usual amount, so the reading is above +100.

The scaling matters. If the mean deviation were $1.60, twice as large, the same $1.50 gap would give a CCI of only 62.5. The index measures distance relative to recent volatility, not in dollars.

  1. Typical price (TP) = (high + low + close) ÷ 3.
  2. Average = the 20-period simple moving average of TP.
  3. Mean deviation = the average of the absolute differences between each of the last 20 TPs and that average.
  4. CCI = (TP − average) ÷ (0.015 × mean deviation).

Turn your phone sideways to read the image. Tap to close.

The worked example on a card: a hypothetical bar with high 51.90, low 51.10 and close 51.50, a typical price of 51.50, a 20-bar average of 50.00 and a mean deviation of 0.80, giving CCI = 1.50 ÷ 0.012 = +125. Beside it a vertical CCI scale from −200 to +200 marks +125 above the +100 line, with a note that about 70–80% of readings fall between ±100.

CCI settings on TradingView

CCI is built into TradingView and free on every plan. Open Indicators, search for Commodity Channel Index and choose the built-in version. Its main inputs are Length, 20 by default, and Source, set to hlc3, which is TradingView’s name for the typical price. The settings also offer an optional smoothing moving average of the CCI line; leave it off to start.

Length changes the character of the line. A shorter length, such as 14, which some traders use, reaches ±100 more often and gives more false signals; a longer one, such as 50, is smoother and rarely reaches the extremes. Lambert suggested choosing a length tied to the market’s cycle, but most traders keep 20 and change the chart timeframe instead.

TradingView draws dashed lines at +100 and −100 by default. You can add a zero line on the Style tab. The timeframe sets how much history the 20 candles cover: 100 minutes on a 5-minute chart, about three regular sessions on a 1-hour chart, and about a month on a daily chart.

How to read CCI: +100, −100 and the zero line

Lambert read the levels as trend signals, not reversal signals. In his original approach a move above +100 marked the start of a strong move up, a reason to be long, and a drop back below +100 ended it; a move below −100 marked a strong move down. The drawing at the top of the page shows that case: CCI crosses above +100 just as price breaks out of its range.

Many traders today read the same levels the other way, as overbought above +100 and oversold below −100. That works in ranges and fails in trends. In a strong uptrend CCI can stay above +100 for many candles, so shorting every high reading means fighting the trend. In the drawing below, a short at $64.60 with a stop at $65.40 risks $0.80 per share; the stop is hit on the next candle and price keeps climbing to $69.50.

The zero line marks where price crosses its own average. Above zero, the typical price is above its 20-candle average; below zero, it is under it. Divergence works as with other oscillators: a new price high with a lower CCI high shows fading momentum, but it needs a break of structure to mean anything, as the RSI divergence guide explains.

Turn your phone sideways to read the image. Tap to close.

An uptrend with a CCI panel below in which the line stays mostly above +100, in a shaded zone. A sell signal at 64.60 is marked as an overbought short that becomes a loss: the red dashed stop at 65.40 is hit and price keeps rising.

CCI pullback strategy, with entry, stop and target

One way to use CCI with the trend: in an uptrend, wait for a pullback that pushes CCI below −100, then buy when CCI crosses back above −100 and the candle closes up at a level. The trend comes from the chart, for example price above a rising 50-period EMA; CCI only times the end of the pullback.

Hypothetical example on a 1-hour chart: price is above a rising 50 EMA and made a high at $74.40. It pulls back to support at $72.00, with a low of $71.95, and CCI drops to −135. The next candle closes at $72.60 and CCI rises back to −85. You buy at $72.60 with a stop at $71.70, below the low and the support, which risks $0.90 per share. The target is the prior high at $74.40, $1.80 away: twice the risk, or 2R.

If you risk $90 on the trade, $90 ÷ $0.90 = 100 shares, and a full stop-out costs about $90 plus costs. The failed version: price closes below $71.70, support breaks and CCI makes a new low. You take the planned loss, more if a gap fills the stop below its price. The stop loss and take profit guide covers stop placement.

Turn your phone sideways to read the image. Tap to close.

An uptrend above a rising dashed EMA 50 pulls back to support at 72.00. In the CCI panel below, the line drops to −135, below −100, then crosses back above it, circled. On the price chart a buy signal prints at 72.60, with a red dashed stop at 71.70 and a green dashed target at 74.40.

Combining CCI with other tools

CCI works best as a timing tool inside a plan that already has a trend and a level. Three pairings are common:

  • A trend filter: a rising moving average, the slope of a Keltner Channel or the ADX above about 20 to 25. Take only the CCI signals that agree with it.
  • A level: support, resistance or a prior high or low, so the stop has a clear place to go.
  • Volume or price structure, not a second momentum oscillator. CCI, RSI and the stochastic all measure momentum, so stacking them repeats one opinion three times.

Common CCI mistakes

Like every oscillator, CCI is wrong often. Most losses come from a few habits:

  • Treating +100 as a sell signal and −100 as a buy signal in a trend.
  • Expecting a ceiling. CCI has no maximum, so +200 can turn into +300.
  • Acting before the candle closes. The typical price and the reading change until the bar is complete.
  • Comparing raw readings across very different stocks or timeframes without looking at how each one usually behaves.
  • Using CCI without a stop. A clean cross back above −100 still fails when support breaks.

CCI terms

The words used in this guide, defined in one place.

Commodity Channel Index (CCI)
A momentum oscillator by Donald Lambert that measures how far the typical price is from its average, relative to its mean deviation. It has no fixed limits.
Typical price (TP)
The average of the high, low and close of a candle: (high + low + close) ÷ 3. TradingView calls it hlc3.
Mean deviation
The average absolute distance of the last 20 typical prices from their average. It scales CCI to recent volatility.
0.015 constant
Lambert's scaling factor, chosen so that roughly 70% to 80% of CCI readings fall between −100 and +100.
+100 and −100 levels
The lines that mark unusually strong moves up and down. They are not automatic sell or buy signals.