PROTECTED SOURCE SCRIPT

Divergence Detector

50
📈 Divergence Detector – Pine Script Indicator

🎯 Purpose

Detects bullish/bearish divergences between price and:

  • 📊 WaveTrend
  • 📈 RSI (Relative Strength Index)
  • 📉 Stochastic Oscillator


Divergences signal potential trend reversals.

Features & Advantages

✅ Multi-Indicator Analysis – checks 3 oscillators simultaneously.
✅ Customizable Filters – min. divergence length & distance between signals.
✅ Clean Visuals – colored lines + labels for clarity.
✅ Alerts – get notified when divergences appear.

⚙️ Settings

🔹 General

  • Pivot Lookback (15) – pivot detection depth.
  • Max Bars to Look Back (50) – limits divergence search range.
  • Min Divergence Length (6) – avoids noise.
  • Min Distance Between Signals (10) – prevents signal overcrowding.


🔹 Indicators

WaveTrend:

  • Channel Length (9)
  • Average Length (12)
  • MA Length (3)


RSI: Length (14)

Stochastic:

  • Length (14)
  • K Smoothing (3)


🔹 Colors & Style

  • Bullish (🟢 Green)
  • Bearish (🔴 Red)
  • Line Width (2)
  • Show Labels (ON/OFF)


📖 How to Use?

1. Bullish Divergence 🟢:

  • Price → Lower Lows | Oscillator → Higher Lows = Potential UP reversal.


2. Bearish Divergence 🔴:

  • Price → Higher Highs | Oscillator → Lower Highs = Potential DOWN reversal.


3. Alerts – enable in TradingView.

⚠️ Limitations

❌ False signals – not every divergence leads to a reversal.
❌ Lagging – pivot-based detection delays signals.
❌ Chart clutter – too many lines if unchecked.

💡 Pro Tips

✔ Combine with support/resistance levels.
✔ Avoid using alone on low timeframes (M1-M15).
✔ Adjust settings for your trading style (e.g., increase Min Divergence Length for daily charts).

❤️ Support This Project

If you find this indicator helpful and want to support future developments, donations are appreciated at:

USDT (TRC20): THFFLEZSpTqapYF6oj9rmuTCQVUXvuz7VS

Your generosity helps maintain and improve free indicators for the trading community!

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。