OPEN-SOURCE SCRIPT

RSI Divergence (Regular+Hidden) Detector(Mastersinnifty)

123
Description
The RSI Divergence (Regular + Hidden) Detector identifies both regular and hidden divergences between price and the Relative Strength Index (RSI). It automatically marks divergence points on the chart using short-form labels for quick recognition:
  • RB – Regular Bullish Divergence
  • RS – Regular Bearish Divergence
  • HB – Hidden Bullish Divergence
  • HS – Hidden Bearish Divergence

This tool helps traders spot potential reversals or trend continuation setups with clear, on-chart visual signals.

How It Works
  • Calculates RSI based on user-selected source and length.
  • Scans a specified lookback range for matching high/low points in price and RSI.
  • Validates divergences based on minimum RSI difference and minimum price percentage difference.
  • Marks detected divergences with short-form labels directly on the price chart.
  • Allows toggling between regular and hidden divergence detection.


Inputs
  • RSI Length – Period for RSI calculation.
  • Lookback Bars – Number of bars to scan for divergence.
  • Minimum RSI Difference – Minimum required RSI value change between points.
  • Minimum Price Difference (%) – Minimum required price percentage change between points.
  • Overbought / Oversold Levels – RSI thresholds for signal validation.
  • Show Regular Divergences – Enable/disable regular divergence detection.
  • Show Hidden Divergences – Enable/disable hidden divergence detection.


Use Case
  • Identify potential reversal points using regular divergences.
  • Spot possible trend continuation opportunities with hidden divergences.
  • Enhance entry/exit timing by combining divergence signals with other technical tools.
  • Apply in any market and timeframe, from scalping to swing trading.


Disclaimer
This indicator is for educational and research purposes only. It does not guarantee future performance. Always combine signals with your own analysis and risk management strategy before making trading decisions.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.