OPEN-SOURCE SCRIPT

ADX Divergence and Gap Monitor [theUltimator5]

1 715
ADX Divergence and Gap Monitor is a custom technical analysis tool designed to visualize momentum imbalances and sudden shifts in trend participation using the ADX system. It combines traditional ADX, DI+ and DI− calculations with dynamic filtering and visual highlighting to help identify key moments of directional acceleration or weakening.

🔍 What It Does:
This indicator builds on the Average Directional Index (ADX) system to detect conditions where market trend strength diverges significantly from directional input (DI) activity. It includes two major visual signals:

Highlight Backgrounds
These appear when the indicator detects a “gap” or sudden acceleration in DI values while ADX remains low, suggesting early-stage momentum bursts or signal noise spikes.

The trigger threshold for DI change can be adjusted using the Gap Trigger Level input.

A background highlight is shown when DI+ or DI− increases sharply, either from a low-ADX environment or from a rapid standalone spike.

GAP Markers
Optional yellow label markers display the word "GAP" just below the lowest line (ADX, DI+, or DI−) whenever a gap condition is triggered. These provide a more noticeable visual cue without crowding the chart.

You can enable or disable the markers with the Show GAP Markers toggle.

🧠 Advanced Divergence Detection:
The script also scans for dominant ADX divergence events, where ADX is significantly higher than DI+ or DI−, indicating strong trend force with weak directional participation. When these conditions are met:

Red or green background fills appear depending on whether DI+ or DI− is being overpowered.

These conditions are based on customizable moving averages and DI strength relationships.

⚙️ Key Inputs:
  • ADX Length: Period for ADX calculation
  • DI Moving Average: Smoothing length for directional index signals
  • Gap Trigger Level: Minimum DI change needed to trigger a GAP highlight
  • Show Highlight Backgrounds: Toggle to display or hide background signals
  • Show GAP Markers: Toggle to show or hide text-based GAP labels


🧪 Use Cases:
  • Spot early breakouts or reversals when DI activity spikes while ADX is still low
  • Identify periods of trend exhaustion or false breakouts using divergence logic
  • Confirm trade entry points when ADX begins to rise after a GAP event


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.