Commodity Channel Index (CCI) Explained: Formula, ±100 Levels and Settings
The Commodity Channel Index (CCI) measures how far the current typical price is from its rolling average relative to the mean absolute deviation of typical prices. Although originally developed for commodities, it can be calculated on other instruments with consistent high, low and close data. Its scale is not bounded at ±100, and its readings do not provide a probability of reversal.
CCI formula step by step
Typical price TP=(high+low+close)/3. For an N-bar window, calculate the simple average of the N typical prices. Then calculate mean absolute deviation: the average of the absolute differences between each TP and that same window mean. CCI=(current TP−mean TP)/(0.015×mean absolute deviation). The 0.015 constant is a historical scaling convention. If all prices in the window are identical, the denominator is zero and the calculation is undefined.
Worked example
Use five fictional typical prices of 96, 98, 100, 102 and 104. Their mean is 100. The absolute deviations are 4, 2, 0, 2 and 4, so mean absolute deviation is 12/5=2.4. With current TP 104, CCI=4/(0.015×2.4)=111.11.
| Observation | Typical price | Absolute deviation from mean 100 |
|---|---|---|
| 1 | 96 | 4 |
| 2 | 98 | 2 |
| 3 | 100 | 0 |
| 4 | 102 | 2 |
| 5 | 104 | 4 |
| Mean | 100 | 2.4 |
Using the same observations in reverse order gives a current typical price of 96 with the same mean and deviation, producing CCI −111.11. A practical rolling calculation recomputes the mean and all deviations when a new bar enters the window. Do not average each bar’s deviation from a different historical rolling mean unless deliberately implementing a different indicator.
What +100 and −100 mean
A CCI reading of +100 means the numerator equals 100×0.015=1.5 times the window’s mean absolute deviation. A reading of −100 means an equally sized negative displacement. Those thresholds are not percent returns, and CCI does not have a universal maximum of 100. A strong directional move can generate readings beyond ±200. The same level can be investigated as a momentum threshold or as an extreme for a mean-reversion hypothesis, but these are distinct rules.
CCI versus RSI and Bollinger Bands
| Indicator | Normalisation | Scale |
|---|---|---|
| CCI | Mean absolute deviation of typical price | Can exceed ±100 |
| RSI | Relative smoothed gains and losses | 0–100 |
| Bollinger Bands | Standard deviation around moving average | Price units for bands |
Mean absolute deviation is not standard deviation: squared deviations and square roots are not part of conventional CCI. Replacing the denominator with standard deviation produces another normalised statistic. A shorter lookback generally responds faster to recent prices, but it changes both the mean and the deviation estimate. A 20-period setting is common, not an established optimum for every market.
Testing CCI crossings
A completed-bar momentum rule might record a move from +85 to +115 across +100. A separate mean-reversion rule could instead wait for a prior reading below −100 followed by a recovery above that threshold. Record the threshold and direction before testing. In a hypothetical entry at 105 and stop level at 99, planned price risk is six units per share regardless of whether CCI reads 115 or 180. A gap may increase losses. The indicator does not translate directly into risk per trade.
Practical verification
Use the same OHLC feed, session and lookback to reproduce platform values. Allow the window to fill before comparing outputs. Check whether a forming candle is being used and how flat-price windows are handled. Evaluate the same entry and exit logic with and without CCI, include trading costs and reserve unseen data for validation. A threshold that performed well on the calibration period alone is not sufficient evidence.
How price dispersion changes the same displacement
Compare the example window 96, 98, 100, 102, 104 with a second window of 90, 92, 100, 114, 104. Both have a mean of 100 and latest typical price of 104. The second has absolute deviations of 10, 8, 0, 14 and 4, giving mean absolute deviation of 7.2. Its CCI is therefore 4/(0.015×7.2), or approximately 37.04, rather than 111.11. The same current displacement from the mean receives a smaller reading in the more dispersed window. CCI consequently reflects the current price in relation to its recent dispersion, not simply how far the instrument has risen.
Spreadsheet and platform validation
For a five-bar test, place the five typical prices in cells B2:B6. Calculate AVERAGE(B2:B6) and use AVEDEV(B2:B6), where available, to compute their mean absolute deviation from the common window mean. Divide B6 minus the average by 0.015 times that deviation. For each subsequent row shift both ranges together. Check a flat-price window separately to avoid accidental division by zero. Compare a completed-bar result with the platform’s display; intrabar values may continue changing until the bar closes. A mismatch can also arise from the platform using a configurable input other than typical price. Check the calculation source before assuming an error in the market data.
For another measure of normalised price movement, see the Stochastic Oscillator, which uses recent extremes rather than mean absolute deviation.
FAQs
Can CCI exceed 100?
Yes. ±100 are conventional reference levels rather than fixed limits.
Is CCI only for commodities?
No. It is computed from OHLC data and can be evaluated across instruments.
Does CCI use volume?
No in its conventional formula; it uses typical price and price dispersion.
Continue with Stochastic Oscillator, RSI and Bollinger Bands.
Continue your learning with technical analysis foundations and learning pathways and indicator redundancy.
Further reading
StockCharts ChartSchool: Commodity Channel Index explains the conventional scaling and computation.
General educational information only, not personalised financial advice. Trading involves risk of loss.
Stay Ahead of the Markets
Get market analysis, financial news and practical trading insights delivered straight to your inbox.