Momentum · 150-500/mo

CCI Buy Sell Signals - Commodity Channel Index Guide

CCI buy sell signals for TradingView. Overbought, oversold, and divergence patterns with Pine Script code, parameter tuning, and CCI trades on NQ and BTC.

CCI Signal Interpretation

Quick-reference guide to 7 signal types you will see on the chart.

Signal TypeIndicator ConditionMarket MeaningReliability
Overbought (>+100) → SellCCI rises above +100 then crosses back below +100Price has moved excessively high. Expect mean reversion or trend stall. Most reliable in range-bound markets.3/5
Oversold (<-100) → BuyCCI drops below -100 then crosses back above -100Price has sold off sharply. Bounce or reversal likely. Stronger signal when combined with support zone.3/5
Bullish Divergence → BuyPrice makes lower low, CCI makes higher low below -100Downside momentum weakening despite new lows. Classic reversal setup. CCI divergence is often more sensitive than RSI divergence.4/5
Bearish Divergence → SellPrice makes higher high, CCI makes lower high above +100Upward momentum fading at new highs. Trend exhaustion signal. Works well after extended runs on daily charts.4/5
+100 Breakout → Trend BuyCCI crosses above +100 from belowStrong momentum entering the market. Signals a potential new uptrend. Use with a trend filter to stay in the trade.4/5
-100 Breakdown → Trend SellCCI crosses below -100 from aboveStrong selling pressure starting. Indicates a potential new downtrend. Best used to enter short positions with confirmation.4/5
Zero Line CrossCCI crosses above or below the zero lineZero line cross acts as a momentum change signal. Above zero = bullish bias, below zero = bearish bias. Less reliable on its own.2/5

CCI Pine Script Signal Code

Ready-to-use Pine Script code for generating buy/sell signals. Copy and paste into your TradingView Pine Editor.

Pine Script v5
//@version=5
indicator("CCI Buy Sell Signals", overlay=false)

len = input.int(20, "CCI Period")
src = input.source(close, "Source")
ob = input.int(100, "Overbought Level")
os = input.int(-100, "Oversold Level")
showZeroLine = input.bool(true, "Show Zero Line")

cci = ta.cci(src, len)

// Oversold Buy Signal
buySignal = ta.crossover(cci, os)

// Overbought Sell Signal
sellSignal = ta.crossunder(cci, ob)

// Trend: CCI crossing +100 to the upside (strong momentum entry)
trendBuy = ta.crossover(cci, ob)

// Trend: CCI crossing -100 to the downside (strong momentum exit / short entry)
trendSell = ta.crossunder(cci, os)

// Bullish Divergence
lowerLowPrice = low < low[1] and cci > cci[1]
bullDiv = low[2] > low and cci[2] < cci

// Bearish Divergence
higherHighPrice = high > high[1] and cci < cci[1]
bearDiv = high[2] < high and cci[2] > cci

// Zero Line Cross
zeroCrossUp = ta.crossover(cci, 0)
zeroCrossDown = ta.crossunder(cci, 0)

plot(cci, "CCI", color=#2962FF)
hline(ob, "Overbought +100", color=#FF5252, linestyle=hline.style_dashed)
hline(os, "Oversold -100", color=#4CAF50, linestyle=hline.style_dashed)
hline(showZeroLine ? 0 : na, "Zero Line", color=#757575, linestyle=hline.style_dotted)

plotshape(buySignal, "Buy", shape.triangleup, location.bottom, color=#4CAF50, size=size.small)
plotshape(sellSignal, "Sell", shape.triangledown, location.top, color=#FF5252, size=size.small)
plotshape(trendBuy, "Trend Buy", shape.triangleup, location.bottom, color=#00BCD4, size=size.small)
plotshape(trendSell, "Trend Sell", shape.triangledown, location.top, color=#FF9800, size=size.small)
plotshape(bullDiv, "Bull Div", shape.labelup, location.bottom, color=#00BCD4, size=size.small)
plotshape(bearDiv, "Bear Div", shape.labeldown, location.top, color=#FF9800, size=size.small)
plotshape(zeroCrossUp, "Zero Up", shape.circle, location.bottom, color=#4CAF50, size=size.tiny)
plotshape(zeroCrossDown, "Zero Down", shape.circle, location.top, color=#FF5252, size=size.tiny)

alertcondition(buySignal, "CCI Oversold Buy", "CCI crossed above oversold (-100)")
alertcondition(sellSignal, "CCI Overbought Sell", "CCI crossed below overbought (+100)")
alertcondition(trendBuy, "CCI Trend Buy", "CCI crossed above +100 (strong momentum)")
alertcondition(trendSell, "CCI Trend Sell", "CCI crossed below -100 (strong momentum)")
alertcondition(bullDiv, "CCI Bullish Divergence", "Bullish CCI divergence detected")
alertcondition(bearDiv, "CCI Bearish Divergence", "Bearish CCI divergence detected")
alertcondition(zeroCrossUp, "CCI Zero Cross Up", "CCI crossed above zero line")
alertcondition(zeroCrossDown, "CCI Zero Cross Down", "CCI crossed below zero line")

Recommended Parameters for CCI

Parameter settings tested across different market conditions and timeframes.

Feature comparison table: Default vs Description
ParameterDefaultDescription
CCI Period20Number of bars for calculation. Default 20 works for most timeframes. Lower values (10-14) produce earlier signals with more noise. Higher values (30-50) smooth the line for swing trading on daily charts.
SourceClosePrice source for CCI calculation. Close is standard. HL2 works better on noisy intraday data. HLC3 gives smoother readings on BTC and crypto pairs.
Overbought Level+100Threshold for overbought conditions. Tighten to +150 or +200 in strong trends to avoid premature signals. Loosen to +80 for range-bound markets on lower timeframes.
Oversold Level-100Threshold for oversold conditions. Tighten to -150 or -200 when catching falling knives in extended moves. Loosen to -80 for faster entries on 5m scalps.

CCI + Pineify Invite-Only: Better Together

CCI alone gives you one signal type. Pineify invite-only indicator combines CCI with RSI divergences, MACD confirmation, and Supertrend filters in one overlay. Fewer charts, clearer signals.

Instead of switching between 7 different signals on separate charts, you get a single multi-confirmation setup.

See the Invite-Only Indicator

FAQ

CCI Signals FAQ

Stop juggling CCI with 4 other charts

Pineify combines CCI, RSI, MACD, and Supertrend into one invite-only indicator. One click setup.

Try Pineify Free