Formula
TP = (H + L + C) / 3
MD = sum(|TP - SMA(TP, N)|) / N
CCI = (TP - SMA(TP, N)) / (0.015 * MD); CCI = 0 when MD = 0How TraderAI calculates it
TraderAI uses the typical price (high + low + close) / 3 with a length of 20. The mean deviation is the average absolute distance of the typical price from its 20-period simple average. The constant 0.015 scales the result so that most readings fall between -100 and +100. When the mean deviation is zero, CCI is 0. The first value appears after 20 candles.
Live example
How traders read it
Readings above +100 or below -100 show price moving unusually far from its average, which some traders read as strong momentum and others as stretched price.
Moving back inside the -100 to +100 range is often read as that strength fading.
Divergence between price and CCI can warn that a move is losing strength.
Limitations
- CCI has no upper or lower bound, so extreme levels differ between markets and timeframes.
- Like other oscillators, it gives frequent signals in choppy markets.
Settings and defaults
| Setting | Default | Allowed range |
|---|---|---|
| Period | 20 | 2 to 500 |
What it plots
Drawn in its own pane below the price chart, with its own scale.
| Line | Unit | Drawn as | First value |
|---|---|---|---|
| Value | Index value | Line | after 20 candles |
Calculation notes
- Distance of the typical price from its average, scaled by mean deviation. Zero deviation reads 0.
Questions
What is Commodity Channel Index?
The Commodity Channel Index (CCI) measures how far the typical price is from its moving average, scaled by the average distance from that average. Values near zero mean price is close to its recent average; large positive or negative values mean it has moved unusually far.
How does TraderAI calculate Commodity Channel Index?
TraderAI uses the typical price (high + low + close) / 3 with a length of 20. The mean deviation is the average absolute distance of the typical price from its 20-period simple average. The constant 0.015 scales the result so that most readings fall between -100 and +100. When the mean deviation is zero, CCI is 0. The first value appears after 20 candles.
What are the default settings of Commodity Channel Index?
The defaults are Period: 20. You can change every setting on the live chart.
Can I use Commodity Channel Index for free on TraderAI?
Yes. Every indicator in the library can be added to the free live chart. The free plan keeps up to 2 indicators active at the same time; Pro lets you combine more on one chart.
Educational content. Indicators describe past prices; they do not predict future prices and are not investment advice.