OPEN-SOURCE SCRIPT
Smart Price Divergence (MACD Filter) + EMA

Smart MACD Price Divergence + EMA
This indicator automatically spots price divergences filtered by MACD momentum and trend direction with EMA:
🔹 Finds regular bullish & bearish divergences
🔹 Filters signals using a simple EMA trend filter
🔹 Clear triangle labels on the chart
🔹 Ready-to-use alerts for your strategy
Use it to catch potential reversal points when the trend may be losing strength.
How it works
Bearish Divergence: Price makes a higher high above the EMA while MACD makes a lower high → possible reversal down.
Bullish Divergence: Price makes a lower low below the EMA while MACD makes a higher low → possible reversal up.
The EMA filter helps spot extreme areas where the trend may be overextended.
Signal colors
🔻 Red triangle — Bearish Price Divergence (potential short)
🔺 Green triangle — Bullish Price Divergence (potential long)
Works on any timeframe and market (crypto, forex, indices, stocks).
✅ Subscribe to my profile to get new useful Pine Script tools soon!
💡 Want a custom version?
I can build private Pine Script indicators & strategies tailored exactly for you — scalping signals, trend or reversal strategies, custom filters for crypto, forex, stocks, or any pairs you trade.
I can also improve or fix your existing scripts.
If you want a unique, high-quality and profitable tool — contact me anytime!
📩 Telegram 👉 t.me/Artem_Pine
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。