SHK CCI+RSI Merged | ZigZag Swing | HA Signal | Dual Divergence// ============================================================================
// 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 — FULL CONFLUENCE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
A clean, all-in-one oscillator that merges CCI and RSI into a
single blended line — eliminating indicator clutter while
preserving the best signals from both.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 HOW THE BLEND WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RSI is normalized to the CCI scale before blending:
• RSI 50 → 0 (zero line)
• RSI 70 → +100 (upper level)
• RSI 30 → -100 (lower level)
The two oscillators are then averaged:
Blended = (CCI + Normalized RSI) / 2
This means ±100 is the true overbought/oversold boundary
for BOTH indicators simultaneously.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 WHAT YOU SEE — 2 LINES ONLY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🟢 CCI+RSI Blended Line
Dynamic color based on position vs Signal MA and zero line:
• Bright green → above MA and above zero (strong bull)
• Faded green → above MA but below zero (weak bull)
• Bright red → below MA and below zero (strong bear)
• Faded red → below MA but above zero (weak bear)
🟡 Signal MA Line (EMA / SMA / WMA — your choice)
Colored by Heikin Ashi candle direction:
• 🟢 Green → HA candle is bullish (momentum rising)
• 🔴 Red → HA candle is bearish (momentum falling)
The MA color flip gives early trend change warning.
📊 Histogram bars behind the lines show trend strength
with intensity — brighter = deeper into extreme zone.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔀 ZIGZAG — SWING & INTERNAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ZigZag is drawn directly ON the blended oscillator —
not on price — so you see market structure on the
indicator itself.
✅ Main Swing ZigZag — major HH / HL / LH / LL pivots
✅ Internal ZigZag — minor swings inside the main structure
✅ Labels: HH, HL, LH, LL at every confirmed pivot
✅ Customizable: depth, deviation, backstep, color, style
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📉 DUAL DIVERGENCE DETECTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Two independent divergence engines running simultaneously:
🟩 CCI+RSI Divergence (solid lines)
Detected on the blended oscillator pivots vs price pivots
• Lime line + "Bull Div" label → bullish divergence
• Red line + "Bear Div" label → bearish divergence
🟦 RSI-Only Divergence (dashed lines)
Detected on raw RSI pivots, drawn at normalized scale
• Aqua dashed + "RSI Bull Div" → RSI bullish divergence
• Orange dashed + "RSI Bear Div" → RSI bearish divergence
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ ZERO LINE CROSSES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔼 Green triangle (bottom) → blended crossed above zero
🔽 Red triangle (top) → blended crossed below zero
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 EXTREME ZONE HIGHLIGHTING
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Background shading activates when blended crosses ±100:
• 🟢 Green background → strong bullish zone
• 🔴 Red background → strong bearish zone
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 ALERTS INCLUDED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Strong Bullish / Bearish signal
✅ Zero line cross (bull & bear)
✅ CCI+RSI above +100 / below -100
✅ Overbought / Oversold zone entry & exit
✅ RSI overbought / oversold / mid cross
✅ Heikin Ashi direction flip (MA color change)
✅ ZigZag swing high / swing low confirmed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ FULLY CUSTOMIZABLE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• CCI length and source
• RSI length, source, OB/OS levels
• Signal MA type (EMA / SMA / WMA) and length
• ZigZag depth, deviation, backstep, colors, styles
• Internal ZigZag independently configurable
• Divergence lookback and threshold (separate for CCI & RSI)
• All visual elements individually toggleable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 BEST USED WITH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Price action / support-resistance levels
• Volume profile or VWAP on the main chart
• Higher timeframe trend confirmation
• Works on all markets: equities, futures, forex, crypto
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ 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(s) of this script — SHK — are 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. Consult a
qualified and licensed financial advisor before making
any investment or trading decisions.
By using this indicator you acknowledge and accept
all risks associated with trading and release the
author from any and all liability.
📌 TRADE SMART. MANAGE YOUR RISK. PROTECT YOUR CAPITAL.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Wskaźnik Pine Script®






















