SMA of CCI Indicator: Smoother Signals for Better Trades in TradingView
If you've ever used the Commodity Channel Index (CCI) and found yourself overwhelmed by its rapid swings and false signals, you're not alone. I've been there too, watching the CCI bounce around like a hyperactive kid on a sugar rush, making it hard to distinguish real opportunities from noise.
That's exactly why the SMA of CCI exists. By applying a Simple Moving Average to the standard CCI, this indicator smooths out those erratic movements and reveals the underlying momentum with much greater clarity. In my trading experience, switching from raw CCI to the smoothed version has significantly reduced the number of premature entries I used to make.
The concept is simple but powerful: take the CCI's momentum readings and run them through an SMA filter. What you get is a cleaner signal line that still captures the essence of momentum analysis but with far fewer whipsaws. It's like putting on glasses for the first time - suddenly, everything becomes clearer.

What is the SMA of CCI Indicator?
The SMA of CCI is a momentum oscillator that combines two well-established technical analysis tools: the Commodity Channel Index (CCI) and the Simple Moving Average (SMA). This combination creates a smoother, more reliable momentum indicator that filters out market noise while preserving meaningful trend signals.
The calculation works in two steps:
-
Calculate the CCI: The standard CCI formula measures how far the current price has moved from its statistical mean. It uses the typical price (high + low + close / 3) and compares it to a simple moving average of typical prices, normalized by the mean deviation.
-
Apply SMA Smoothing: Once the CCI values are calculated, a Simple Moving Average is applied to them. This smoothing process reduces the noise and creates a signal line that's easier to interpret.
The indicator displays two lines:
- CCI Line (Blue): The raw Commodity Channel Index values showing immediate momentum readings
- SMA Line (Red): The smoothed version of the CCI, providing clearer trend direction
Standard reference levels remain at +100 (overbought) and -100 (oversold), with a zero line indicating neutral momentum. What makes this indicator unique is the interplay between the fast CCI line and its slower SMA counterpart - their crossovers and divergences create actionable trading signals.
Compared to using CCI alone, the SMA of CCI offers several advantages:
- Fewer false signals during choppy market conditions
- Clearer trend identification through the SMA line
- Crossover signals between CCI and its SMA for entry/exit timing
- Better visualization of momentum shifts
How to Add SMA of CCI to TradingView
Adding the SMA of CCI indicator to your TradingView charts is straightforward, whether you prefer using Pineify's visual editor or adding custom Pine Script code.
Using Pineify Editor
Pineify makes it easy to add and customize the SMA of CCI without writing any code. The visual interface lets you configure all parameters with simple dropdown menus and input fields.
Steps to add the indicator:
- Visit Pineify and open the editor
- Click on "Add Indicator" in the indicator panel
- Search for "SMA of CCI" in the indicator list
- Configure your preferred settings (source, CCI length, SMA length)
- Generate the Pine Script code and add it to TradingView
The whole process takes about 5 minutes, and you can customize every aspect of the indicator including colors, line widths, and display levels.
Using Pine Script Code
For those who prefer working directly with code, here's the complete Pine Script v6 implementation:
//@version=6
indicator(title="SMA of CCI", overlay=false, max_labels_count=500)
// SMA of CCI Pine Script v6
p_ta_sma_of_cci(series float source, simple int cciLength, simple int smaLength) =>
cciValue = ta.cci(source, cciLength)
smaOfCci = ta.sma(cciValue, smaLength)
[cciValue, smaOfCci]
[p_ind_1_cci, p_ind_1_smaOfCci] = p_ta_sma_of_cci(close, 20, 9)
// Plots
plot(p_ind_1_cci, "CCI", color.rgb(41, 98, 255, 0), 1)
plot(p_ind_1_smaOfCci, "SMA", color.rgb(242, 54, 69, 0), 1)
hline(100, "Overbought", color=#787B86, linestyle=hline.style_dotted)
hline(-100, "Oversold", color=#787B86, linestyle=hline.style_dotted)
hline(0, "Zero Line", color=color.new(#787B86, 50))
To add this to TradingView:
- Open TradingView and go to Pine Editor (bottom panel)
- Copy and paste the code above
- Click "Add to Chart"
- Adjust settings in the indicator's settings panel
How to Use SMA of CCI (Practical Trading Strategies)
After testing the SMA of CCI across various markets and timeframes, I've found several strategies that consistently produce reliable signals.
Strategy #1: The Crossover Method
This is the most straightforward approach and works well for trend following.
Setup Conditions:
- The indicator is added to your chart with default settings (CCI 20, SMA 9)
- You're trading a trending market (not sideways)
Entry Signals:
- Long Entry: CCI line crosses above the SMA line while both are below the zero line
- Short Entry: CCI line crosses below the SMA line while both are above the zero line
Stop-Loss Placement:
- Place stops below the recent swing low for longs
- Place stops above the recent swing high for shorts
Take-Profit Targets:
- Exit longs when CCI reaches +100 or crosses back below SMA
- Exit shorts when CCI reaches -100 or crosses back above SMA
Strategy #2: The Oversold/Overbought Reversal
This strategy focuses on catching reversals at extreme levels.
Setup Conditions:
- CCI has pushed beyond +100 or below -100
- SMA line confirms the extreme reading
Entry Signals:
- Long Entry: CCI drops below -100, then the SMA line starts turning upward while CCI crosses above SMA
- Short Entry: CCI rises above +100, then the SMA line starts turning downward while CCI crosses below SMA
Stop-Loss Placement:
- For longs, set stop below the lowest point of the oversold move
- For shorts, set stop above the highest point of the overbought move
Take-Profit Targets:
- Target the zero line for initial profit taking
- Use trailing stops for extended moves
Strategy #3: The Divergence Play
Divergences between price and the SMA of CCI often signal major turning points.
Setup Conditions:
- Price makes a new high/low
- The SMA line of CCI fails to confirm
Entry Signals:
- Bullish Divergence: Price makes a lower low, but SMA of CCI makes a higher low
- Bearish Divergence: Price makes a higher high, but SMA of CCI makes a lower high
Stop-Loss Placement:
- Place stops beyond the divergence swing point
Take-Profit Targets:
- Target the previous significant swing high/low
- Scale out at multiple targets
Strategy #4: Zero Line Momentum
The zero line acts as a momentum filter, separating bullish from bearish territory.
Setup Conditions:
- Both CCI and SMA are on the same side of zero
- Looking for trend continuation entries
Entry Signals:
- Long Entry: Both lines are above zero, CCI pulls back to touch SMA then bounces
- Short Entry: Both lines are below zero, CCI rallies to touch SMA then falls
This strategy works particularly well when combined with price action at support and resistance levels.
Best SMA of CCI Settings
The default settings of CCI Length 20 and SMA Length 9 work well for most situations, but different trading styles benefit from adjusted parameters.
Scalping (1-5 Minute Charts)
| Parameter | Recommended Value | Reason |
|---|---|---|
| CCI Length | 14 | Faster response to price changes |
| SMA Length | 5 | Quick smoothing for rapid decisions |
For scalping, you need the indicator to react quickly. Shorter periods mean more signals, so combine with tight stop losses and quick profit targets. I've found this works best on liquid pairs where spreads are minimal.
Day Trading (15-60 Minute Charts)
| Parameter | Recommended Value | Reason |
|---|---|---|
| CCI Length | 20 | Balanced sensitivity |
| SMA Length | 9 | Standard smoothing |
The default settings are designed for this timeframe. They provide a good balance between responsiveness and noise filtering. For more volatile instruments like crypto, consider increasing CCI length to 25.
Swing Trading (4H-Daily Charts)
| Parameter | Recommended Value | Reason |
|---|---|---|
| CCI Length | 30 | Reduced noise on higher timeframes |
| SMA Length | 14 | Smoother trend identification |
Swing traders need fewer but higher-quality signals. Longer periods filter out intraday noise and focus on meaningful momentum shifts. The SMA length of 14 aligns well with the common 14-period settings used in other indicators.
Position Trading (Weekly Charts)
| Parameter | Recommended Value | Reason |
|---|---|---|
| CCI Length | 50 | Long-term momentum focus |
| SMA Length | 20 | Significant trend smoothing |
For position traders, the indicator becomes a macro momentum gauge. These settings help identify major market cycles and long-term trend changes. Signals are rare but tend to be significant.
Advanced SMA of CCI Techniques
Multi-Timeframe Analysis
One of the most powerful ways to use SMA of CCI is across multiple timeframes. Here's my approach:
- Higher Timeframe Direction: Check the daily chart SMA of CCI for overall trend bias
- Trading Timeframe Signals: Use 1-hour or 4-hour chart for entry signals
- Alignment Rule: Only take trades where both timeframes agree
When the daily SMA of CCI is above zero and rising, I focus exclusively on long setups on lower timeframes. This alignment dramatically improves win rates.
Combining with Other Indicators
The SMA of CCI works exceptionally well with:
Volume Indicators: High volume during SMA of CCI crossovers confirms the signal strength. Low volume crossovers are often false moves.
Moving Averages: When price is above the 200 EMA and SMA of CCI gives a bullish crossover, the probability of success increases significantly.
RSI: Using RSI as a confirmation tool helps filter weak SMA of CCI signals. If both oscillators agree, the trade setup is stronger.
Bollinger Bands: Band squeezes followed by SMA of CCI crossovers often lead to explosive moves.
Risk Management Considerations
Even with smoothing, the SMA of CCI will generate losing trades. Here are my risk management rules:
- Never risk more than 1-2% of capital per trade
- Wait for the SMA to confirm before entering (not just CCI moves)
- Avoid trading during major news events when the indicator can give false signals
- Use the SMA line as a trailing stop reference - if it crosses back, consider exiting
Common Pitfalls and How to Avoid Them
Over-relying on Crossovers: Not every crossover is tradeable. Look for crossovers that occur at significant levels (+100, -100, or zero) rather than random crosses in the middle.
Ignoring the Trend: The SMA of CCI works best when aligned with the prevailing trend. Fighting the trend leads to whipsaws.
Too Many Trades: The smoothing is meant to reduce trades, not increase them. If you're taking more than 3-4 trades per day on swing timeframes, you're probably overtrading.
How to Backtest SMA of CCI
Before trading any indicator with real money, backtesting is essential. The Pineify Editor enables you to create complete trading strategies based on the SMA of CCI with specific entry and exit conditions.
Building a Backtest Strategy
Using Pineify, you can configure:
Entry Conditions:
- CCI crosses above/below SMA
- SMA crosses above/below zero line
- CCI reaches overbought/oversold levels
Exit Conditions:
- Opposite crossover signal
- Take profit at specific CCI levels
- Stop loss based on percentage or price levels
Risk Management:
- Position sizing rules
- Maximum drawdown limits
- Trailing stop settings
The strategy tester in TradingView then shows you how these rules would have performed historically. Pay attention to:
- Win rate percentage
- Average profit/loss ratio
- Maximum drawdown
- Number of trades
I recommend testing on at least 100 trades before considering live trading. If the strategy doesn't show a positive expectancy in backtesting, it's unlikely to work in live markets.
Position Sizing Recommendations
Based on backtest results, position size using:
- 1% risk per trade for strategies with 40-50% win rate
- 2% risk per trade for strategies with 50-60% win rate
- Scale position size based on conviction level from signal quality
FAQs
What's the difference between regular CCI and SMA of CCI?
Regular CCI shows raw momentum readings that can be volatile and generate many false signals. SMA of CCI applies a moving average smoothing to the CCI values, creating a cleaner signal line. This smoothing reduces whipsaws while still capturing meaningful momentum shifts. The SMA of CCI also provides crossover signals between the raw CCI and its smoothed version, which regular CCI doesn't offer.
What are the best SMA of CCI settings for cryptocurrency trading?
For crypto markets, I recommend using slightly longer periods due to higher volatility. Try CCI Length of 25 and SMA Length of 12. These settings filter out the extreme noise common in crypto while still capturing meaningful moves. For Bitcoin on the 4-hour chart, these settings have worked well in my experience.
Can I use SMA of CCI as my only indicator?
While it's possible, I wouldn't recommend relying on any single indicator. The SMA of CCI works best as part of a broader analysis framework. Combine it with price action analysis, support/resistance levels, and at least one volume-based indicator for best results. Think of indicators as team members, each contributing information to the overall trading decision.
How do I avoid false signals with SMA of CCI?
Several techniques help reduce false signals:
- Trade only in the direction of the higher timeframe trend
- Wait for both CCI and SMA to be on the same side of zero before trading
- Look for crossovers at significant levels (+100, -100, zero) rather than random crossings
- Confirm signals with volume - strong moves should have volume support
- Avoid trading during low-liquidity periods or major news events
What markets work best with SMA of CCI?
The SMA of CCI works across all markets including stocks, forex, crypto, and commodities. It performs best in trending markets where momentum is clearly directional. Sideways, ranging markets tend to generate more false signals regardless of settings. For volatile markets like crypto, use slightly longer periods. For stable markets like major forex pairs, default settings often work fine.
How do I interpret divergences with SMA of CCI?
Focus on the SMA line for divergence analysis rather than the raw CCI. When price makes a new high but the SMA line makes a lower high, that's bearish divergence suggesting potential reversal. When price makes a new low but the SMA line makes a higher low, that's bullish divergence. These signals are especially powerful when they occur at key support/resistance levels.
Key Takeaways
- The SMA of CCI smooths the standard CCI by applying a Simple Moving Average, reducing noise and false signals
- Crossovers between the CCI line and SMA line provide clear entry and exit signals
- Default settings (CCI 20, SMA 9) work for day trading; adjust for other timeframes
- Always combine with trend analysis and proper risk management
- Backtest any strategy thoroughly before trading with real capital
The SMA of CCI won't guarantee profitable trades, but it provides a cleaner lens for viewing momentum compared to raw CCI. Test it on a demo account first, find the settings that match your trading style, and always maintain strict risk management regardless of how confident any signal appears.


