MarketInOut Stock Screener Log In | Sign Up

Commodity Channel Index (CCI)

By MarketInOut · Updated October 30, 2026

The Commodity Channel Index (CCI) measures how far the typical price has moved away from its own moving average, scaled by how much it normally deviates from that average. High readings mean price is unusually high compared with its recent average, low readings that it is unusually low. Donald Lambert introduced it in 1980 in Commodities magazine. Despite the name, it works on stocks, ETFs, forex and crypto as well as on futures.

How it is calculated

Typical price  TP = (High + Low + Close) / 3
SMA            = simple moving average of TP over N bars
Mean deviation = average of |TP - SMA| over the same N bars
CCI            = (TP - SMA) / (0.015 x Mean deviation)

The constant 0.015 was chosen so that most readings, roughly 70% to 80%, fall between +100 and −100. CCI has no fixed upper or lower limit: in a sharp move it can reach +300 or −300. Lambert’s period was 20 bars, the most common setting today.

How to read it

  • Trend emergence. Lambert’s own use: a move above +100 shows unusual strength and the possible start of an uptrend; the long is closed when CCI falls back below +100. A move below −100 marks unusual weakness and a possible downtrend.
  • Overbought and oversold. The more common modern reading turns this around: above +100 is overbought, below −100 oversold. A cross back from beyond −100 to above it is a popular mean-reversion entry, best taken in the direction of the larger trend.
  • Zero line. CCI above zero means price is above its average. Some traders use a cross of zero as a simple trend filter.
  • Divergence. Price makes a new high while CCI makes a lower high (bearish), or price makes a new low while CCI makes a higher low (bullish). Divergence that forms at extreme readings, beyond ±100, tends to carry more weight.

Settings and common mistakes

  • Period. 20 is the classic setting; shorter periods (10 to 14) swing beyond ±100 more often, longer ones less. The cci() function on MarketInOut defaults to 18 when no period is given, so write the period you want.
  • Treating ±100 as a ceiling. CCI is unbounded. A reading of +150 in a strong uptrend is normal and is not a sell signal by itself.
  • Mixing up the two schools. “Above +100” is a buy for trend followers and a warning for mean-reversion traders. Decide which approach you are using and test it before relying on it.

SPY (S&P 500 ETF), daily, with CCI(20).

Live chart: SPY (S&P 500 ETF), daily, with CCI(20). The chart updates every trading day.

Screen for it on MarketInOut

CCI is built into our formula language as cci(period). Stocks whose CCI just rose back above −100 from the oversold zone:

exch(nyse,nasdaq) and type(stock) and price > 1 and advol(21) > 1
and cci(20) ca -100

Lambert’s trend signal, CCI crossing above +100, limited to stocks above their 200-day average:

exch(nyse,nasdaq) and type(stock) and price > 1 and advol(21) > 1
and price > sma(200) and cci(20) ca 100

Related: Relative Strength Index (RSI), Bollinger Bands, Stochastic oscillator.




Disclaimer - Privacy Policy - Terms of Service - Cookies - FAQ - Affiliates - Blog