Cci Calculator
Calculate the Commodity Channel Index for identifying cyclical trends and extreme price levels.
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer
Cci Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: CCI = (TP - SMA(TP)) / (0.015 x Mean Deviation)
Worked example — CCI = 51.67 | Bullish Momentum | Price above average but within normal +/-100 range
Formula
CCI = (TP - SMA(TP)) / (0.015 x Mean Deviation)
Where TP = (High + Low + Close) / 3, SMA(TP) is the Simple Moving Average of Typical Prices over N periods, and Mean Deviation is the average of absolute differences between each TP and the SMA. The 0.015 constant normalizes readings so ~75% fall between -100 and +100.
Worked Examples
Example 1: CCI Calculation Example
Problem:For a 20-period CCI, the current Typical Price is 157.67, the 20-period SMA of TP is 155.50, and the Mean Deviation is 2.80. Calculate CCI.
Solution:CCI = (Typical Price - SMA of TP) / (0.015 x Mean Deviation) CCI = (157.67 - 155.50) / (0.015 x 2.80) CCI = 2.17 / 0.042 CCI = 51.67 Interpretation: CCI at 51.67 is between 0 and +100 This indicates bullish momentum but not yet at extreme levels Price is above average but within normal range
Result:CCI = 51.67 | Bullish Momentum | Price above average but within normal +/-100 range
Example 2: CCI Trend Signal
Problem:CCI crosses above +100 from 95 to 115. The 50-period moving average is sloping upward. The previous CCI reading was 95. Evaluate the signal.
Solution:CCI crossing above +100 = New uptrend initiation signal Moving average sloping up = Confirms bullish trend CCI moved from 95 to 115 = Momentum accelerating Lambert strategy: Enter long when CCI crosses +100 Exit when CCI falls back below +100 Stop loss: Below recent swing low or at -100 CCI level Confirmation: Volume should expand on the breakout
Result:Strong Buy Signal | CCI above +100 with trending MA | New uptrend beginning
Frequently Asked Questions
What is the Commodity Channel Index (CCI) and what does it measure?
The Commodity Channel Index (CCI) is a versatile momentum oscillator developed by Donald Lambert in 1980 that measures the deviation of the current typical price from its average over a specified period. Despite its name, CCI works on any financial instrument including stocks, forex, and cryptocurrencies, not just commodities. The indicator oscillates around a zero line, with readings above +100 traditionally indicating an overbought condition or the start of a new uptrend, and readings below -100 indicating an oversold condition or the start of a new downtrend. CCI is unique because approximately 75 percent of readings fall between +100 and -100, making moves beyond these levels statistically significant.
How is the CCI formula calculated step by step?
The CCI calculation involves four steps. First, calculate the Typical Price (TP) for each period as (High + Low + Close) / 3. Second, calculate the Simple Moving Average (SMA) of the Typical Prices over the lookback period (typically 20). Third, calculate the Mean Deviation by finding the average of the absolute differences between each Typical Price and the SMA. Fourth, apply the CCI formula: CCI = (Current TP - SMA of TP) / (0.015 x Mean Deviation). The constant 0.015 was chosen by Lambert to ensure that approximately 70 to 80 percent of CCI values fall between -100 and +100 when the price follows a normal distribution. This normalization makes it easy to identify unusual price movements.
What do CCI readings above +100 and below -100 signify?
CCI readings above +100 indicate that the typical price is significantly above its average, suggesting strong bullish momentum that could signal the beginning of a new uptrend. This is not simply an overbought signal, as in strongly trending markets, CCI can remain above +100 for extended periods. Readings below -100 indicate that the typical price is well below its average, suggesting strong bearish momentum or the start of a downtrend. Lambert originally designed the indicator to identify new trends when CCI crossed above +100 or below -100. The zero line crossing also provides signals, with crosses above zero suggesting bullish momentum is gaining and below zero indicating bearish momentum. Extremely high or low readings may also precede reversals.
What is the best period setting for CCI?
The standard CCI period is 20, which was the default recommended by its creator Donald Lambert. This setting works well for daily charts in most markets, capturing approximately one month of trading data. Shorter periods like 10 or 14 make CCI more responsive to price changes, generating more frequent signals that are useful for short-term trading and scalping. However, shorter periods also produce more false signals and noise. Longer periods like 40 or 50 create smoother CCI readings suitable for swing trading and position trading, with fewer but higher quality signals. For intraday trading, 14 or 20 periods on 15-minute or hourly charts provide a good balance. Many traders use multiple CCI periods simultaneously for confirmation, such as a 14-period CCI for timing and a 50-period CCI for trend direction.
How do you trade CCI divergences?
CCI divergences are powerful reversal signals that occur when price and CCI move in opposite directions. Bullish divergence happens when price makes a lower low while CCI makes a higher low, indicating that selling momentum is weakening despite lower prices. This often occurs near the end of downtrends and suggests a reversal to the upside. Bearish divergence occurs when price makes a higher high but CCI makes a lower high, suggesting that buying momentum is fading even as price reaches new highs. For best results, divergences should form when CCI is in or near extreme territory (above +100 or below -100). Confirm divergence signals with a price action trigger such as a reversal candle pattern, a trendline break, or a support/resistance level. Multiple divergence peaks or troughs increase the reliability of the signal.
How does the 0.015 constant in the CCI formula work?
The constant 0.015 in the CCI formula is a scaling factor that Lambert specifically chose to normalize the indicator readings so that approximately 70 to 80 percent of CCI values fall between -100 and +100 under normal market conditions. Without this constant, the raw ratio of price deviation to mean deviation would produce values that are difficult to interpret consistently across different instruments with varying price levels and volatilities. The constant ensures that readings beyond the plus or minus 100 threshold are statistically unusual, representing price movements that deviate significantly from the norm. This normalization makes it possible to compare CCI readings across different markets, timeframes, and price levels using the same overbought and oversold thresholds of plus 100 and minus 100.
What CCI trading strategies work best for beginners?
The simplest and most effective CCI strategy for beginners is the zero-line cross combined with a trend filter. When CCI crosses above zero with the 50-period moving average sloping upward, enter long and hold until CCI falls below zero or the moving average flattens. This approach aligns you with the trend while using CCI for timing. Another beginner-friendly strategy is the plus or minus 100 threshold system, where you buy when CCI rises above plus 100 and sell when it falls back below plus 100, only in the direction of the major trend. The simplest mean reversion approach involves buying when CCI drops below minus 200 and selling when it rises above plus 200, targeting a return to normal levels. Always use stop losses and start with paper trading to understand CCI behavior before risking capital.
Can CCI be used for identifying market cycles?
Yes, CCI was originally developed specifically for identifying cyclical trends in commodity markets, and it excels at this purpose. The indicator measures how far the current price has deviated from its statistical mean, which naturally oscillates in a cyclical pattern. In markets with regular cycles, CCI will show a predictable rhythm of movements between the plus 100 and minus 100 extremes. Lambert recommended using a period that equals one-third of the identified cycle length for optimal results. For example, if a commodity exhibits a 60-day price cycle, use a 20-period CCI. By tracking the rhythm and amplitude of CCI swings, traders can anticipate when the next cycle turn is likely to occur. Cycle analysis works best in commodity and forex markets that are influenced by seasonal and economic cycles.
How does CCI compare to RSI and other momentum oscillators?
CCI differs from RSI in several important ways. While RSI is bounded between 0 and 100, CCI is unbounded and can theoretically reach any value, making it better at identifying extreme price movements and unusual momentum. RSI uses only closing prices, while CCI uses the Typical Price incorporating highs and lows. CCI includes a mean deviation normalization that RSI lacks, making CCI readings more comparable across different instruments. Compared to the Stochastic Oscillator, CCI responds to deviations from the mean rather than position within a range, giving it a different perspective on momentum. CCI is generally better at identifying new trend starts because readings beyond plus or minus 100 are relatively rare and significant, while RSI and Stochastics can remain in extreme zones during strong trends.
What are common mistakes when using the CCI indicator?
The most common mistake is using CCI readings above plus 100 or below minus 100 purely as overbought and oversold reversal signals. Lambert designed these levels to identify new trend initiations, not necessarily reversals. In strong trends, CCI can remain above plus 100 for weeks or months. Another mistake is ignoring the market context and applying the same strategy in both trending and ranging markets. Using CCI alone without confirmation from other indicators or price action analysis leads to many false signals. Traders often set the period too short, creating a noisy indicator that produces excessive signals. Failing to account for the lag inherent in the CCI calculation, since it uses a moving average that naturally delays signals, is another common error. Always combine CCI with proper risk management including stop losses and position sizing.
References
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer · Editorial policy
Related Calculators
🧮Pip Calculator
Calculate pip with inputs, formulas, and instant results.
🧮Forex Margin Calculator
Calculate forex margin with inputs, formulas, and instant results.
🧮Forex Profit Calculator
Calculate forex profit with inputs, formulas, and instant results.
🧮Spread Cost Calculator
Calculate spread cost with inputs, formulas, and instant results.
🧮Forex Commission Calculator
Calculate forex commission with inputs, formulas, and instant results.
🧮Currency Pair Correlation Calculator
Calculate currency pair correlation with inputs, formulas, and instant results.
🧮Pip to Dollar Converter
Calculate pip to dollar converter with inputs, formulas, and instant results.
🧮Trading Journal Analyzer
Calculate trading journal analyzer with inputs, formulas, and instant results.