OPEN-SOURCE SCRIPT
EMA Pullback Indicator [ATR-based]

🟦 EMA Pullback Indicator [ATR-based]
This indicator identifies pullbacks in trending markets using the crossover of two EMAs (Fast and Slow). When a pullback occurs during a valid trend, an entry is triggered after price resumes in the trend direction. ATR is used to dynamically calculate stop-loss and take-profit levels.
🔍 Strategy Logic:
Trend Detection: EMA(8) vs EMA(21)
Pullback Zones:
In a bullish trend, a pullback is when price dips below the Fast EMA
In a bearish trend, a pullback is when price rises above the Fast EMA
Entry Trigger: Re-entry into trend direction after pullback
Stop Loss / Take Profit:
Based on ATR × SL/TP multipliers
Exit Options:
TP/SL Hit
Exit on new pullback (optional toggle)
Multiple Entry Toggle: Choose whether to allow multiple pullback entries or not
⚙️ Inputs:
Fast EMA Length
Slow EMA Length
ATR Period
SL Multiplier
TP Multiplier
Allow Multiple Entries
Exit on New Pullback
📊 Visuals:
Colored EMAs and fill zone between them
Grey bars during pullback
Blue/Black trend bar colors
Entry markers and TP/SL levels with labels
Real-time ATR display in corner
📢 Alerts Included:
Long/Short Pullback Entry
Take Profit Hit
Stop Loss Hit
This indicator identifies pullbacks in trending markets using the crossover of two EMAs (Fast and Slow). When a pullback occurs during a valid trend, an entry is triggered after price resumes in the trend direction. ATR is used to dynamically calculate stop-loss and take-profit levels.
🔍 Strategy Logic:
Trend Detection: EMA(8) vs EMA(21)
Pullback Zones:
In a bullish trend, a pullback is when price dips below the Fast EMA
In a bearish trend, a pullback is when price rises above the Fast EMA
Entry Trigger: Re-entry into trend direction after pullback
Stop Loss / Take Profit:
Based on ATR × SL/TP multipliers
Exit Options:
TP/SL Hit
Exit on new pullback (optional toggle)
Multiple Entry Toggle: Choose whether to allow multiple pullback entries or not
⚙️ Inputs:
Fast EMA Length
Slow EMA Length
ATR Period
SL Multiplier
TP Multiplier
Allow Multiple Entries
Exit on New Pullback
📊 Visuals:
Colored EMAs and fill zone between them
Grey bars during pullback
Blue/Black trend bar colors
Entry markers and TP/SL levels with labels
Real-time ATR display in corner
📢 Alerts Included:
Long/Short Pullback Entry
Take Profit Hit
Stop Loss Hit
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。