SHK CCI+RSI Merged | HA Signal MA | Dual Divergence | v6// ============================================================================
// DISCLAIMER: This script is for educational purposes only.
// The author is NOT responsible for any trading losses.
// Past performance does not guarantee future results.
// Trade entirely at your own risk.
// ============================================================================
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔷 SHK CCI+RSI MERGED — CLEAN 2-LINE OSCILLATOR
Powered by Pine Script v6
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Stop cluttering your chart with two separate oscillators.
This indicator fuses CCI and RSI into ONE intelligent
blended line — giving you stronger, more reliable signals
with less noise.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 HOW THE BLEND WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RSI is first normalized onto the CCI scale:
• RSI 50 → 0 (neutral / zero line)
• RSI 70 → +100 (overbought boundary)
• RSI 30 → -100 (oversold boundary)
Then both are averaged into one line:
➤ Blended = ( CCI + Normalized RSI ) / 2
The ±100 and ±200 levels now represent overbought
and oversold zones for BOTH indicators at once.
If RSI is disabled, the line falls back to pure CCI.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 WHAT YOU SEE — ONLY 2 LINES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
● LINE 1 — CCI+RSI Blended (thick)
Color changes dynamically based on position
relative to the Signal MA and zero line:
🟢 Bright Green → above MA + above zero (strong bull)
🟢 Faded Green → above MA + below zero (weak bull)
🔴 Bright Red → below MA + below zero (strong bear)
🔴 Faded Red → below MA + above zero (weak bear)
● LINE 2 — Signal MA (EMA / SMA / WMA)
Colored by Heikin Ashi candle direction:
🟢 Green MA → HA candle is bullish (trend rising)
🔴 Red MA → HA candle is bearish (trend falling)
The MA color flip is your early trend change warning —
before price confirms the move.
● HISTOGRAM — Strength Bars
Displayed behind the lines. Brighter color = deeper
into overbought / oversold territory.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📉 DUAL DIVERGENCE ENGINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Two independent divergence detectors run simultaneously:
🟩 CCI+RSI Divergence (solid lines)
Pivot-based detection on the blended oscillator vs price:
• Lime solid line + "Bull Div" → Bullish divergence
• Red solid line + "Bear Div" → Bearish divergence
🟦 RSI-Only Divergence (dashed lines)
Detected on raw RSI pivots, plotted at normalized scale:
• Aqua dashed + "RSI Bull Div" → RSI bullish divergence
• Orange dashed + "RSI Bear Div" → RSI bearish divergence
Both engines use adjustable lookback and threshold
settings so you can tune sensitivity to your style.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ ZERO LINE CROSSES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔼 Green triangle at bottom → crossed above zero (bull)
🔽 Red triangle at top → crossed below zero (bear)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 EXTREME ZONE BACKGROUND
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Background shading activates when blended is in
an extreme zone (beyond ±100 and above/below MA):
🟢 Green background → strong bullish pressure
🔴 Red background → strong bearish pressure
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 BUILT-IN ALERTS (14 CONDITIONS)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Strong Bullish signal (blended > +100 & above MA)
✅ Strong Bearish signal (blended < -100 & below MA)
✅ Zero line cross — bullish & bearish
✅ CCI+RSI crossed above +100
✅ CCI+RSI crossed below -100
✅ Overbought zone entry & exit
✅ Oversold zone entry & exit
✅ RSI crossed overbought / oversold
✅ RSI crossed above / below midline (50)
✅ Heikin Ashi flipped bullish (MA turns green)
✅ Heikin Ashi flipped bearish (MA turns red)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS & CUSTOMIZATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CCI Settings
• Length (default 20), Source (default HLC3)
• Signal MA type: EMA / SMA / WMA
• Signal MA length (default 14)
CCI Levels
• Overbought: +200 | Oversold: -200
• Upper level: +100 | Lower level: -100
RSI Settings
• Enable / disable RSI blend
• Length (default 14), Source (default Close)
• OB / OS levels (default 70 / 30)
Features (each individually toggleable)
• CCI+RSI divergence lines
• RSI-only divergence lines
• Trend strength histogram
• Zero line cross markers
• Extreme zone background shading
Divergence Settings
• Lookback bars (1–20)
• CCI divergence threshold
• RSI divergence threshold
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 WORKS BEST WITH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Key support and resistance levels on price chart
• VWAP or Volume Profile for confluence
• Higher timeframe trend bias confirmation
• All markets: Equities, Futures, Forex, Crypto, Commodities
• All timeframes: Scalping to Swing trading
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This indicator is published for EDUCATIONAL and
INFORMATIONAL purposes only.
❌ This is NOT financial advice.
❌ This is NOT a buy or sell recommendation.
❌ Past performance does NOT guarantee future results.
Trading financial instruments including stocks, futures,
forex, commodities and cryptocurrencies involves
SUBSTANTIAL RISK OF LOSS and is not suitable for
every investor or trader.
The creator — SHK — is NOT responsible for any trading
losses, damages or financial consequences resulting
from the use or misuse of this indicator.
All trading decisions are SOLELY YOUR OWN RESPONSIBILITY.
You agree to trade entirely at YOUR OWN RISK.
Always conduct your own due diligence and consult a
qualified financial advisor before making any trading
or investment decisions.
By using this indicator you acknowledge and fully accept
all risks and release the author from any liability.
📌 TRADE SMART. MANAGE YOUR RISK. PROTECT YOUR CAPITAL.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Indicateur Pine Script®






















