Momentum indicators

Commodity Channel Index (CCI): Formula, the ±100 Levels, and Two Opposite Strategies on Real Prices

Lambert’s CCI from its documented formula: how the typical price is compared with its average and its mean deviation, why the band of ±100 is a scaling choice, and what a trend rule and a reversion rule gave on Bitcoin and the S&P 500 ETF.

· Founder of PatternsWizard
Checked 8 min read
CCI(20) on Bitcoin, daily, August 30, 2026 to October 28, 2026. Illustration of how the indicator reads, not a backtest.
On this page
  1. How CCI is calculated
  2. Two opposite ways to read CCI
  3. The two rules on real prices
  4. Does it work?
  5. Frequently asked questions

The Commodity Channel Index (CCI) measures how far the typical price of a bar has moved from its recent average, in units of its recent mean deviation. Donald Lambert introduced it in Commodities magazine in 1980, and despite the name it is applied to any market. Lambert scaled it so that most readings would fall between −100 and +100; a reading outside that band is the event traders watch. Below, the formula, the two opposite ways CCI is traded, and what each gave on daily Bitcoin and on the S&P 500 ETF.

CCI(20) on daily Bitcoin

CCI(20) on Bitcoin, daily, February 21, 2026 to October 28, 2026. Illustration of how the indicator reads, not a backtest.
  • Price, daily candles (hollow up, filled down)
  • CCI(20) (solid line)
CCI(20) on Bitcoin, daily, February 21, 2026 to October 28, 2026. Illustration of how the indicator reads, not a backtest.

How CCI is calculated

The typical price of a bar is the average of its high, low and close. CCI subtracts the 20-bar simple moving average of the typical price, then divides by the mean deviation, the average distance of the last 20 typical prices from that moving average, multiplied by a constant of 0.015.

The constant is the only arbitrary piece. StockCharts explains that Lambert set it at 0.015 “to ensure that approximately 70 to 80 percent of CCI values would fall between −100 and +100,” and adds that the share depends on the look-back period: a shorter CCI is more volatile and spends more time outside the band. StockCharts gives the direction: a 10-period CCI has a smaller share of values inside ±100, a 40-period one a larger share. On our data the share was lower than Lambert’s target, and the direction depended on the market. We counted every CCI value of the site’s 600 daily bars of each market: Bitcoin from March 8, 2025 and the S&P 500 ETF from June 7, 2024, both to October 28, 2026, each CCI starting once it has its full look-back. On the ETF the order was the reverse of StockCharts’ at every length we tried, from CCI(10) at 59.39% inside to CCI(14) at 57.58%, CCI(20) at 56.80% and CCI(40) at 53.12%. On Bitcoin the four lengths stayed within 1.6 points of each other, from 60.61% for CCI(40) to 62.18% for CCI(14), with no clear order: a gap that size is about nine days out of nearly 600, and when we split the sample in two, CCI(40) went from below CCI(20) in the first half to above it in the second.

Share of days with CCI inside ±100, by look-back

Share of days with CCI inside ±100, by look-back. CCI(10): Bitcoin 61.76%, S&P 500 ETF 59.39%; CCI(14): Bitcoin 62.18%, S&P 500 ETF 57.58%; CCI(20), the default: Bitcoin 60.93%, S&P 500 ETF 56.80%; CCI(40): Bitcoin 60.61%, S&P 500 ETF 53.12%. Our computation; the inputs and the method are in the text.
  • Bitcoin
  • S&P 500 ETF
Our computation; the inputs and the method are in the text.Lambert aimed for 70 to 80%. Daily bars, 600 per market, to October 28, 2026; a value of exactly ±100 counts as inside.

Two opposite ways to read CCI

The same reading above +100 is used in two contradictory ways. StockCharts presents the trend reading first: “When CCI surges above +100, it reflects strong price action that can signal the start of an uptrend,” and a fall below −100 the start of a downtrend. The other reading treats CCI as an overbought and oversold oscillator: above +100 the price is stretched and due to come back, below −100 it is stretched on the downside. Divergences, a new price high without a new CCI high, are read in both approaches.

Two opposite readings of the same CCI signal

Two opposite readings of the same CCI signal: price on top, CCI below with levels at plus 100, zero and minus 100. When CCI crosses above plus 100, the trend reading buys while the reversion reading calls it overbought and sells. Later, when CCI comes back above minus 100 from below, the reversion reading buys.
Schematic, not market data.The trend reading and the reversion reading act in opposite directions on the same crossing of +100; the reversion reading buys later, when CCI comes back above −100.

To see how the two behave, we wrote one simple long-only rule for each. They are our own illustrations, not Lambert’s rules.

  • Trend: buy at the close when CCI crosses above +100, sell at the close when it falls back below 0.
  • Reversion: buy at the close when CCI comes back above −100 from below, sell at the close when it crosses above +100.

The two rules on real prices

The CCI chart under the introduction shows CCI(20) on daily Bitcoin from February 21 to October 28, 2026, 250 days. We ran both rules on the whole series, from the first CCI value, and counted the trades opened in that window. Buying and holding Bitcoin over the window returned +19.67%, from 67,975.93 to 81,343.50.

Trend rule, BitcoinEntryExitResult
Trade 172,666.77 on March 4, 202667,262.91 on March 7−7.44%
Trade 269,948.63 on March 1068,918.12 on March 21−1.47%
Trade 371,924.22 on April 778,148.05 on May 16+8.65%
Trade 464,756.28 on July 1563,915.00 on July 28−1.30%
Trade 569,334.79 on August 1978,306.43 on September 9+12.94%
Trade 681,249.99 on September 1983,321.81 on October 7+2.55%

Three of the six trades won, and the six compound to +13.28% before costs, below buy and hold. No trend trade was open at the start of the window.

Reversion rule, BitcoinEntryExitResult
Open at the window start89,559.67 on January 22, 202672,666.77 on March 4−18.86%
Trade 168,284.48 on March 3171,924.22 on April 7+5.33%
Trade 277,615.52 on May 2164,756.28 on July 15−16.57%
Trade 364,106.56 on August 469,334.79 on August 19+8.16%
Trade 477,225.70 on September 1181,249.99 on September 19+5.21%
Still open83,773.12 on October 1181,343.50 on October 28, not closed−2.90%

The reversion rule won three of the four trades it opened and closed in the window, and those four compound to about 0.00%: one loss of 16.57%, held for 55 days while Bitcoin fell through May and June, erased the three gains. The trade already open on February 21 lost 18.86% the same way. A rule that buys weakness and waits for strength has no exit when the weakness continues.

The two rules against buy and hold, last 250 days of each market

The two rules against buy and hold, last 250 days of each market. Trend rule, trades opened and closed: Bitcoin +13.28%, S&P 500 ETF +4.49%; Reversion rule, trades opened and closed: Bitcoin 0.00%, S&P 500 ETF +8.61%; Buy and hold: Bitcoin +19.67%, S&P 500 ETF +14.83%. Our computation; the inputs and the method are in the text.
  • Bitcoin
  • S&P 500 ETF
Our computation; the inputs and the method are in the text.Compounded results before costs. Bitcoin from February 21 to October 28, 2026; ETF from October 30, 2025 to October 28, 2026. Trades open at the start or still open at the end are left out, as in the tables.

On the S&P 500 ETF over its own last 250 days, from October 30, 2025 to October 28, 2026, the picture reverses. The trend rule won 2 of 7 trades, for +4.49% compounded, with a trade open at the window start (bought October 24, 2025 at 670.02, sold November 6 at 663.16, −1.02%). The reversion rule won 5 of 6, for +8.61%, its worst trade −1.85% from February 6 to April 8, 2026, and a seventh trade is still open from October 26 at 765.37, +0.91% at the last close. Buying and holding the ETF returned +14.83%. Neither rule beat holding on either market, and the one that did better changed with the market.

CCI(20) on the S&P 500 ETF, last 250 days

CCI(20) on S&P 500 ETF, dividend-adjusted prices, daily, October 30, 2025 to October 28, 2026. Illustration of how the indicator reads, not a backtest.
  • Price, daily candles (hollow up, filled down)
  • CCI(20) (solid line)
CCI(20) on S&P 500 ETF, dividend-adjusted prices, daily, October 30, 2025 to October 28, 2026. Illustration of how the indicator reads, not a backtest.

Does it work?

We have no long-run measurement of CCI: our bench tests chart patterns detected by rule against random entries, not indicators (see our methodology). The trades above are two markets over one year, worked through to show the two readings, not a test. What they do show is that the choice between the trend and the reversion reading matters more than the setting, and that it has to be made before looking at the result.

Ken Wood built a whole method on two CCIs, described in Woodies CCI. For other momentum tools, see the RSI, the stochastic oscillator, or the full list of momentum indicators.

Every pattern's results on one sheet

The only pattern cheat sheet with tested stats: 152 patterns, what the textbook says and what really happened on 6 markets. Free PDF, sent to your inbox.

The PDF by email, plus our newsletter: new tests and results that change. Unsubscribe anytime. Privacy.

Frequently asked questions

How is the Commodity Channel Index calculated?

Take the typical price, (high + low + close) / 3, subtract its 20-bar average, and divide by 0.015 times the mean deviation of the typical price over the same 20 bars.

Should I use RSI or CCI?

They answer different questions. RSI compares up and down closes and is bounded from 0 to 100; CCI measures distance from an average and has no upper or lower limit, so it can show how unusual a move is. Neither has been shown to beat the other in general.

What does a CCI above 100 mean?

That the typical price is further above its average than usual. StockCharts reads a surge above +100 as a possible start of an uptrend; others read it as overbought. Over the last 250 days of our two markets, to October 2026, the trend reading did better on Bitcoin and the reversion reading on the S&P 500 ETF.

What is the best CCI period?

The StockCharts default is 20. StockCharts says a shorter period puts more readings outside ±100. On our daily S&P 500 ETF bars it did the reverse: CCI(10) was inside the band on 59.39% of the days, CCI(20) on 56.80% and CCI(40) on 53.12%. On our daily Bitcoin bars the length made almost no difference, between 60.61% and 62.18% for the four lengths we tried.

When was CCI created?

Donald Lambert introduced it in Commodities magazine in 1980.

Sources

  1. StockCharts ChartSchool, Commodity Channel Index (CCI)
, Founder of PatternsWizard

Passionate about finance, quantitative trading and data analysis. Amaury built the PatternsWizard test bench, which detects each pattern on full price history and measures what happened next against random entries.

PatternsWizard tests chart and candlestick patterns on full market history, against random entries. How we test patterns.

179 patterns testedRandom-walk self-test passed

Related guides

All momentum indicators articles