CCI (Commodity Channel Index)
Measures deviation from a statistical mean -- unbounded unlike RSI, Lambert's constant, and trend vs mean reversion usage.
What is the Commodity Channel Index?
The Commodity Channel Index (CCI) measures how far the current price has deviated from its average over a given period. When the price is well above its recent average, CCI is a large positive number. When it is well below, CCI is a large negative number. When the price is near its average, CCI is near zero.
Unlike RSI and Stochastic, CCI is unbounded -- it can reach any value, not just 0 to 100. Readings of +200 or -300 are possible during extreme moves. The standard reference levels are +100 and -100, but CCI does not cap at these values the way RSI caps at 0 and 100.
Despite its name, CCI is not limited to commodities. It works on any asset -- stocks, forex, crypto -- and is available in Simula for all markets.
How It's Calculated
CCI uses the Typical Price (the average of high, low, and close) and measures how far it deviates from its moving average, scaled by the Mean Deviation:
In plain English: calculate the Typical Price for the current candle. Subtract the simple moving average of the Typical Price over the last N candles. Divide by the Mean Deviation (the average of how far each Typical Price was from its SMA) multiplied by Lambert's constant (0.015).
Lambert's Constant (0.015)
The 0.015 constant was chosen by Donald Lambert (who created CCI in 1980) so that approximately 70-80% of CCI readings would fall between -100 and +100. This makes the +100/-100 levels meaningful as "unusual" thresholds -- when CCI breaks beyond them, the price is deviating more than typical.
Simula uses 0.015 as the default. Changing this value scales the CCI output -- a larger constant compresses the values (making it harder to reach +/-100), while a smaller one expands them.
The +100 / -100 Levels
Two Ways to Use CCI
Mean reversion
In a ranging market, treat CCI readings above +100 as a signal that the price has stretched above its mean and may pull back. Readings below -100 suggest the price has stretched below its mean and may bounce. This approach works when the price is oscillating around a stable average -- mean reversion strategies are built around this concept.
Trend identification
In a trending market, CCI crossing above +100 can signal the start of a strong move, and staying above +100 confirms the trend is intact. The entry is when CCI breaks through +100 from below; the exit is when it drops back below +100. This approach uses CCI as a breakout detector rather than a reversal signal.
Which approach to use depends on the market conditions. Using CCI as a mean reversion tool in a trending market (or as a trend tool in a ranging market) will produce poor results. Pairing CCI with a trend indicator can help determine which mode to apply.
CCI vs RSI
RSI and CCI both measure momentum, but in different ways:
RSI compares the average gain to the average loss and produces a bounded 0-100 reading. It is inherently normalised -- an RSI of 80 means roughly the same thing regardless of the asset's volatility.
CCI measures deviation from a mean in units of the asset's own Mean Deviation, so a reading already accounts for how volatile that asset is -- a CCI of +200 sits about the same distance from the mean (roughly three Mean Deviations) whichever asset you measure. What makes CCI harder to compare across assets than RSI is that it is unbounded: RSI is pinned to a 0-100 range where 80 always means the same thing, whereas a CCI of +200 has no fixed ceiling to anchor against, so how extreme it is depends on how far that asset normally travels.
Things to Watch Out For
CCI can stay beyond +/-100 for extended periods
During strong trends, CCI can remain above +100 (or below -100) for many candles. Just as with RSI overbought readings, an extreme CCI value does not guarantee a reversal. It means the price is deviating strongly from its recent average -- which is exactly what happens during a trend.
The period strongly affects sensitivity
CCI's default period is 20 (range: 5-50 in Simula). A shorter period makes CCI more volatile and produces more frequent +/-100 crossings. A longer period smooths the output and produces fewer, more significant signals. The right period depends on the timeframe and the type of moves you want to capture.
Where to Go Next
RSI (Relative Strength Index) -- the bounded alternative for measuring overbought/oversold.
Stochastic Oscillator -- position within the recent range, with crossover signals.
Oscillators Overview -- all 8 oscillator types available in Simula.
Mean Reversion -- strategies built around CCI's mean-deviation signals.