CCI (Commodity Channel Index) explained
By Oalgo · Last reviewed
The Commodity Channel Index (CCI) measures how far the typical price of a candle is from its recent average. It has no fixed top or bottom; +100 and −100 are the levels people usually watch. The usual setting is 20 candles.
How is CCI calculated?
#- Typical price = (high + low + close) ÷ 3, for each candle.
- Take the 20-period simple moving average (SMA) of the typical price.
- Mean deviation = the average distance of the last 20 typical prices from that average.
- CCI = (typical price − SMA) ÷ (0.015 × mean deviation).
The 0.015 is a fixed scaling constant. It only sets the size of the scale.
How do you read CCI?
#| What you see | What it suggests |
|---|---|
| Above +100 | The typical price is well above its recent average. Often called overbought. |
| Below −100 | The typical price is well below its recent average. Often called oversold. |
| Above 0 | The typical price is above its recent average. |
| Below 0 | The typical price is below its recent average. |
A reading above +100 does not mean price must fall, and one below −100 does not mean it must rise. In a strong trend, CCI can stay beyond one of those levels for a long time.
How do people use CCI in rules?
#- Enter when CCI crosses back above −100, and exit when it crosses back below +100.
- Treat a move above +100 as the start of a strong move instead of a turning point.
- CCI crossing above or below zero.
- Use it with a trend filter, or next to RSI, so that two conditions must agree.
What can CCI not tell you?
#CCI compares price only with its own recent average. It does not say how far a move will go. A short period makes it jump around, and a long one makes it slow. Test any rule on past prices with a backtest, then forward test it.
In Oalgo you can tell Oalgo AI your CCI rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.
Read next
- What is RSI? The RSI indicator explainedThe RSI indicator compares recent up moves with down moves on a scale from 0 to 100. Learn how it is calculated, how to read it, and how to test RSI rules.
- Stochastic oscillator explained: how to read itThe Stochastic oscillator shows where the close sits in the recent high-low range, from 0 to 100. Learn %K and %D, how to read them, and how to test rules.