PROTECTED SOURCE SCRIPT

RSI Divergence

63
✅ What does the script do?
  • It calculates RSI and looks for divergences between RSI and price.
  • It checks bullish divergence when price makes a lower low, but RSI makes a higher low (potential reversal upwards).
  • It checks bearish divergence when price makes a higher high, but RSI makes a lower high (potential reversal downwards).
  • It only considers divergences within a certain bar distance range (user adjustable: minimum and maximum bars between the two points).

When a divergence is found, it:
  • Draws a line connecting the two points of divergence.
  • Plots a small triangle on the chart (below bars for bullish, above bars for bearish).
  • Optionally triggers an alert so you can be notified.

It does not repaint because it confirms divergence only after the second pivot forms.


✅ Simple & Informative Description
RSI Divergence Indicator
This indicator helps identify potential bullish and bearish divergences between price and the RSI (Relative Strength Index).
  • Bullish divergence:
    Price makes a lower low, but RSI makes a higher low → shown with a green triangle and a green line connecting the lows.
  • Bearish divergence:
    Price makes a higher high, but RSI makes a lower high → shown with a red triangle and a red line connecting the highs.


The script has user settings to:
  • Adjust the RSI length.
  • Set overbought/oversold levels.
  • Define the minimum and maximum bar distance between divergence points.



When a valid divergence is detected, the indicator plots the signal on the chart and can trigger an alert.

This is a visual aid to spot possible reversal areas based on RSI divergence. It doesn’t give trade entries on its own but can be combined with other tools for confirmation

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.