Downloading...
OPEN-SOURCE SCRIPT
Updated

[Top] Unified Divergence Detector

1 025
The [Top] Unified Divergence Detector (UDD) is a powerful tool designed to identify both regular and hidden divergences across multiple oscillators—RSI, CCI, and Stochastic—in a single unified indicator.

Unlike other divergence tools that focus on one source at a time, this script cross-checks multiple indicators simultaneously and consolidates the results into a single signal. Labels appear only when at least one divergence is detected, with optional color-coding to distinguish the number and type of divergences:
  • 🐂 Bullish Divergence: Signals a potential reversal or continuation to the upside.
  • 🐻 Bearish Divergence: Signals a potential reversal or continuation to the downside.

The script lets users configure:
  • Whether to detect regular, hidden, or both types of divergence.
  • Pivot lookback parameters and divergence detection range.
  • Separate label colors for 1, 2, or 3+ confirmations from different indicators.

Tooltips are dynamically generated and offer guidance on interpreting each signal based on the oscillator sources involved and the divergence type. Labels are intelligently placed to avoid clutter and display only the strongest, most relevant signals.



Potential Uses
  • Trend Reversals: Spot early signs of exhaustion and prepare for a trend change.
  • Trend Continuations: Confirm existing trends via hidden divergence signals.
  • Multi-Timeframe Confirmation: Combine this indicator with higher timeframe trend tools to validate entries or exits.
  • Custom Strategy Building: Integrate into more complex strategies involving price action or volume filters.




This indicator is ideal for traders who value confirmation from multiple sources and prefer clear, high-confidence signals over constant alerts. It works well across all timeframes and asset classes.
Release Notes
I've added the ability for you to choose how many of the most recent signals to display on the chart. It was getting way too crowded when zooming out!

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.