OPEN-SOURCE SCRIPT
Smart RSI Divergence PRO | Auto Lines + Alerts

Smart RSI Divergence PRO
This indicator automatically finds RSI divergences on price charts:
🔹 Detects both regular & hidden divergences
🔹 Draws auto trendlines connecting swing highs & lows
🔹 Clear triangle labels directly on the chart
🔹 Ready-to-use alerts for your strategy
Use it to spot potential trend reversals and hidden continuation signals.
How it works
Regular Divergence: Price makes a higher high (or lower low) while RSI does not — this can signal a possible trend reversal.
Hidden Divergence: Price makes a lower high (or higher low) while RSI makes a higher high (or lower low) — this can signal a possible trend continuation in the same direction.
Auto Lines & Labels
The script automatically detects local swing highs and lows and draws connecting trendlines on price.
Labels appear on the chart as colored triangles, so signals are easy to see at a glance:
🔻 Red triangle — Regular Bearish Divergence (potential short)
🟠 Orange triangle — Hidden Bearish Divergence (possible trend continuation down)
🟢 Green triangle — Regular Bullish Divergence (potential long)
🔵 Blue triangle — Hidden Bullish Divergence (possible trend continuation up)
Customization
You can adjust:
RSI length
Show/hide regular or hidden divergences
Show/hide auto lines and labels
Customize line width and transparency
Works on any market and any timeframe — crypto, forex, indices, stocks.
⚠️ Disclaimer: This script is for educational purposes only and does not constitute financial advice. Always test any strategy thoroughly and trade at your own risk.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。