OPEN-SOURCE SCRIPT

RSI Momentum Divergence Zones [ChartPrime]

21 354
⯁ OVERVIEW
RSI Momentum Divergence Zones [ChartPrime] is a hybrid oscillator and chart overlay tool that detects RSI-based momentum divergences and projects them as key zones on the chart. By combining RSI divergence logic with horizontal level plotting, this indicator reveals high-probability support and resistance areas where price has historically reacted to hidden or classic divergences.

⯁ KEY FEATURES
  • Momentum-Based RSI Source:
    Instead of the classic RSI input, this tool uses the momentum of price as the RSI source:
    Pine Script®
    rsiSrc = ta.mom(close, 10)

    This emphasizes acceleration and deceleration of price moves, sharpening divergence signals and making them more responsive to early shifts in momentum.

  • Automatic Divergence Detection (Optional):
    When enabled, the indicator continuously scans for:
    Bullish Divergence: Price makes a Lower Low while RSI forms a Higher Low
    Bearish Divergence: Price makes a Higher High while RSI forms a Lower High
    It ensures divergence is valid by checking the spacing between pivots (min 5, max 50 bars).

  • Divergence Labels & Markers (RSI Pane + Chart):
    When a valid divergence is detected:
    — On RSI pane:

    Labels appear at HL/LH points (“Bull” / “Bear”)

    Colored lines show pivot structures
    — On price chart:
    syot kilat

    Labels (“▲ Bull” / “Bear ▼”) mark price pivot that triggered the divergence
    Lines highlight the exact price level at the divergence origin
    syot kilat
  • Divergence Zones / Levels (Toggleable):
    The indicator projects horizontal zones across the chart based on confirmed divergence points.
    These levels dynamically extend as long as price respects them, and auto-expire once broken.
    They act as S/R levels created by market imbalance caused by divergence reactions.
    syot kilat
  • Dynamic Zone Extension Logic:
    Once plotted, divergence levels will extend to the right:
    — If price respects the level, the zone keeps growing
    — If broken in the opposite direction, the level stops extending and turns dashed (visually showing break)
    syot kilat
  • Zone Layering and Limit Control:
    You can limit the number of simultaneous zones shown on the chart (e.g., 10 most recent).
    Old zones automatically expire and are removed to keep the chart clean and focused.
    syot kilat
  • Color Customization and Intensity:
    Different colors for bullish and bearish zones let you easily distinguish trend direction.
    Background fill, line width, and transparency are all adjustable.

  • Clean Zone Management with Arrays:
    Behind the scenes, the script uses custom divLevel type arrays to manage plotted levels, ensuring they stay up-to-date, extend correctly, and delete once invalidated.


⯁ USAGE
  • Use bullish divergence zones as potential demand areas and bearish ones as supply zones.
  • Combine RSI pane labels with price-level zones to confirm strength of reversal.
  • Watch for price approaching a divergence level to anticipate reactions or breakouts.
  • Use divergence levels as trade triggers, stop-loss guides, or take-profit markers.
  • Limit signal count using the “Qty Divergence Zones” setting to reduce chart clutter.
  • Enable divergence detection only when you want to focus on key structural zones — ideal for swing or positional setups.


⯁ CONCLUSION
RSI Momentum Divergence Zones [ChartPrime] blends oscillator divergence logic with price action structure to uncover hidden strength or weakness in the market. With flexible zone plotting and clean visual signals, this tool empowers traders to identify where momentum turns into structure — turning hidden signals into tradable edges.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.