Commodity Channel Index (CCI)

Measures how far current price has deviated from its statistical average. Unbounded scale — extreme readings (±100, ±200) signal momentum extremes.

Updated 2026-05-24
8 min read
intermediate

Measures how far the current typical price has deviated from its statistical average over a lookback window, scaled so ~70-80% of values fall between −100 and +100. Unbounded — extreme readings (±200 and beyond) flag genuinely unusual conditions.

Placeholder · Video / Clip

CCI(20) on MES 5m with extreme spikes visible

Author hint: MES 5m, dark theme, ~80-bar window. CCI(20) plotted in a sub-panel with horizontal lines at +100 and -100. Show a stretch with both moderate cycling and one extreme spike beyond ±200. ≤ 8 seconds, no audio. Save to /public/images/guide/indicators/cci/chart.mp4.

What it measures

  • Statistical deviation. How many "mean deviations" the current typical price is from its SMA. Roughly analogous to a z-score, but using mean absolute deviation instead of standard deviation.
  • Momentum strength. Magnitude of CCI tells you how decisively price has broken from the average.
  • Cyclical position. Best known for identifying cyclical extremes in commodities (its original use case) but works on any instrument with reasonable mean-reverting tendencies.

Formula

How AlgoLift computes it

TP = (High + Low + Close) / 3 (Typical Price) MA = SMA(TP, period) MD = mean( |TP[i] − MA| ) over the same period (Mean Deviation) CCI = (TP − MA) / (constant × MD)

The default constant is 0.015. This scaling factor was chosen empirically by Donald Lambert (the indicator's developer in 1980) so that roughly 70–80% of historical CCI values fell between −100 and +100. Different constants change the spread of values without changing the underlying signal.

Inputs in AlgoLift

SettingDefaultRangeNotes
Period202–500Lookback for the SMA and mean deviation.
Constant0.0150.001–0.1Scaling factor. Leave at default unless you have a specific reason.

Recommended periods

  • 14: Faster cyclical detection. More signals, more whipsaws.
  • 20 (default): Standard. Good for swing and intraday.
  • 30–50: Smoother readings for longer-horizon trades.

Outputs in AlgoLift

HandleTypePlottedNotes
CCI ValueNumericAlwaysThe oscillator. Unbounded.
SlopeNumericOn selectRate of change — useful for divergences and turn detection.
Mean DeviationNumericOn selectThe denominator. A pure volatility measure on its own.
Placeholder · Screenshot

CCI node — default state with all three outputs

Author hint: The CCI node on a fresh canvas with default Period=20, Constant=0.015. All three output handles labeled. Dark theme. Tight crop. Save to /public/images/guide/indicators/cci/node.png.

How to read it

  • CCI > +100: Strong upside momentum or overextended price. Both interpretations are valid depending on regime.
  • CCI < −100: Strong downside momentum or oversold conditions.
  • CCI > +200: Genuinely extreme — historically rare. Often precedes a pullback even in trending markets.
  • CCI < −200: Genuinely extreme on the downside.
  • CCI crossing zero: A shift from below-average to above-average price (or vice versa). Often used as a trend filter.

The ambiguity at ±100 — "strength" or "extreme" — is why CCI works differently in trends vs. ranges. Always pair with a regime context.

Key Takeaway

CCI above +100 is either momentum confirmation (in trends) or a reversal warning (in ranges). Without a regime filter telling you which, the same reading produces opposite signals.

Best in / worst in

Best in instruments with clear cyclical behavior (commodities, FX), markets with measurable mean-reverting tendencies, and as a confirmation tool alongside trend filters.

Worst in instruments with persistent one-way drifts (some equity indices during multi-year bull runs) where CCI stays positive almost continuously, and during high-volatility news events that produce extreme readings that don't reverse cleanly.

Three setups

1. CCI breakout — momentum confirmation

In trending markets, use CCI crossing +100/−100 as a momentum-confirmation entry.

  • Long: CCI crosses above +100 AND price > EMA(50).
  • Short: CCI crosses below −100 AND price < EMA(50).

The trend filter is essential — without it, this strategy buys tops and sells bottoms in ranges.

Placeholder · Screenshot

CCI breakout entry filtered by EMA(50) trend

Author hint: Node graph showing CCI(20) Value output feeding a > 100 comparison, AND-gated with a price > EMA(50) check, into an Entry node. Save to /public/images/guide/indicators/cci/setup-01.png.

2. CCI extreme reversion in ranges

In range-bound markets, use CCI extreme readings as mean-reversion entries.

  • Long: CCI < −200 AND CCI slope > 0 (turning back up) AND KAMA Efficiency Ratio < 0.3 (range regime).
  • Short: Symmetric.

The ER filter prevents this setup from firing in trends where CCI < −200 just means strong downside momentum.

3. Zero-line filter for an independent strategy

Use CCI's zero-line cross as a trend filter for another signal generator.

  • Long-only mode: CCI > 0 — the strategy is permitted to take long entries (from RSI, MACD, etc.).
  • Short-only mode: CCI < 0.
  • Flat: CCI between −20 and +20.

A simple, effective regime gate that runs in parallel with the main strategy.

Advanced patterns in AlgoLift

CCI divergence with BarsAgo Modifier. Compare current CCI against its value 10 bars ago, and current price against price 10 bars ago. When they disagree directionally (price higher, CCI lower — or vice versa), divergence is real. Use as a contrarian entry trigger in range regimes.

CCI-driven scale-in. Use the initial signal (any entry trigger) to take a starter position. Then use a Scaled Entry that fires when CCI crosses ±200 in the trade's direction — momentum confirmation that the move has continued. Adds to winners while avoiding adds to fakeouts.

Multi-timeframe CCI for regime filtering. Use CCI(20) on a daily timeframe as a long-horizon momentum filter alongside your 5m execution chart. Only take 5m entries when daily CCI is in the corresponding direction (positive for longs, negative for shorts). See the multi-series Visual Builder pattern.

Common mistakes

  • Treating ±100 as universal reversal thresholds. ±100 means different things in different regimes. In a trend, +100 is confirmation. In a range, +100 might be a top.
  • Using CCI as a primary signal without a trend filter. The most common CCI mistake. Always combine with a regime indicator.
  • Tuning the Constant. It's an empirical scaling factor with no information content. Tuning it just rescales the same signal. Leave it at 0.015.
  • Ignoring the Mean Deviation output. It's a pure volatility reading available for free. Useful in its own right as a regime classifier.
Common Misconception
Myth
CCI was designed for commodities — it doesn't work on stocks or futures indices.
Reality
The name reflects its origin (Donald Lambert designed it for commodity markets in 1980) but the math has nothing commodity-specific in it. CCI works on any instrument with mean-reverting tendencies — which is essentially every market under some conditions and no market under others. The regime, not the asset class, determines whether it works.