OPEN-SOURCE SCRIPT
EMA Trend Pullback with Risk Reward Signals

EMA Trend Pullback with Risk Reward Signals is a trend-following indicator that detects pullback opportunities within established EMA trends and automatically calculates projected entry, stop-loss, and take-profit levels using a configurable risk-reward ratio.
The script uses EMA 25, EMA 50, and EMA 100 alignment to define trend direction and waits for pullbacks into the moving averages before generating confirmation signals.
Features
EMA 25, EMA 50, and EMA 100 trend structure
Bullish trend detection
Bearish trend detection
Pullback recognition to EMA 25 or EMA 50
Candle confirmation filters
Automatic entry level calculation
Automatic stop-loss calculation
Automatic take-profit calculation
Configurable risk-reward ratio
Alert conditions for bullish and bearish signals
Visual signal labels on chart
Inputs
Risk Reward Ratio
Controls the distance of the projected take-profit level relative to risk.
SL Buffer (%)
Adds a percentage buffer around the EMA50-based stop-loss level.
How It Works
Bullish Setup
EMA25 is above EMA50.
EMA50 is above EMA100.
Price pulls back to EMA25 or EMA50.
A bullish confirmation candle closes above EMA25.
A bullish signal is generated.
Bearish Setup
EMA25 is below EMA50.
EMA50 is below EMA100.
Price pulls back to EMA25 or EMA50.
A bearish confirmation candle closes below EMA25.
A bearish signal is generated.
Risk Management
For each signal:
Entry = Signal candle close
Stop Loss = EMA50 plus buffer
Take Profit = Risk × User RR Ratio
Alerts
Available alerts:
Bullish Signal
Bearish Signal
Users can create TradingView alerts directly from these conditions.
Limitations
Signals depend on EMA-based trend definitions.
Performance may vary across instruments and timeframes.
The indicator does not guarantee future price movement.
High-volatility markets may produce additional noise.
Notes
Signals are confirmed only after bar close.
Designed primarily for trend continuation analysis.
Risk management settings should be adjusted according to market conditions.
The script uses EMA 25, EMA 50, and EMA 100 alignment to define trend direction and waits for pullbacks into the moving averages before generating confirmation signals.
Features
EMA 25, EMA 50, and EMA 100 trend structure
Bullish trend detection
Bearish trend detection
Pullback recognition to EMA 25 or EMA 50
Candle confirmation filters
Automatic entry level calculation
Automatic stop-loss calculation
Automatic take-profit calculation
Configurable risk-reward ratio
Alert conditions for bullish and bearish signals
Visual signal labels on chart
Inputs
Risk Reward Ratio
Controls the distance of the projected take-profit level relative to risk.
SL Buffer (%)
Adds a percentage buffer around the EMA50-based stop-loss level.
How It Works
Bullish Setup
EMA25 is above EMA50.
EMA50 is above EMA100.
Price pulls back to EMA25 or EMA50.
A bullish confirmation candle closes above EMA25.
A bullish signal is generated.
Bearish Setup
EMA25 is below EMA50.
EMA50 is below EMA100.
Price pulls back to EMA25 or EMA50.
A bearish confirmation candle closes below EMA25.
A bearish signal is generated.
Risk Management
For each signal:
Entry = Signal candle close
Stop Loss = EMA50 plus buffer
Take Profit = Risk × User RR Ratio
Alerts
Available alerts:
Bullish Signal
Bearish Signal
Users can create TradingView alerts directly from these conditions.
Limitations
Signals depend on EMA-based trend definitions.
Performance may vary across instruments and timeframes.
The indicator does not guarantee future price movement.
High-volatility markets may produce additional noise.
Notes
Signals are confirmed only after bar close.
Designed primarily for trend continuation analysis.
Risk management settings should be adjusted according to market conditions.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Build your trading tools with AI : algotim.com
All content provided by AlgoTim (algo_aakash) is for informational and educational purposes only. Trading involves risk, and past performance does not guarantee future results.
All content provided by AlgoTim (algo_aakash) is for informational and educational purposes only. Trading involves risk, and past performance does not guarantee future results.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Build your trading tools with AI : algotim.com
All content provided by AlgoTim (algo_aakash) is for informational and educational purposes only. Trading involves risk, and past performance does not guarantee future results.
All content provided by AlgoTim (algo_aakash) is for informational and educational purposes only. Trading involves risk, and past performance does not guarantee future results.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。