OPEN-SOURCE SCRIPT
W%R Pullback+EMA Trend [TS_Indie]

🔰 Core Concept of the Strategy
The main idea is “Trend-Following with Momentum Pullback.”
This means trading in the direction of the main trend (defined by EMA) while using Williams %R to identify pullback entries (buying the dip or selling the rally) where momentum returns to the trend direction.
📊 Indicators Used
1. EMA Fast – Defines the short-term trend.
2. EMA Slow – Defines the long-term trend (used as a trend filter).
3. Williams %R
• Overbought zone: above -20
• Oversold zone: below -80
⚙️ Entry Rules
🔹 Buy Setup

1. EMA Fast > EMA Slow → Uptrend condition.
2. Williams %R on the previous candle dropped below -80, and on the current candle, it crosses back above -80 → indicates momentum returning to the upside.
3. Current close is above EMA Fast.
4. Entry Buy at the close of the candle where %R crosses above -80.
🎯 Entry, Stop Loss, and Take Profit
1. Entry: At the candle close where the signal occurs.
2. Stop Loss: At the lowest low between the current and previous candles.
3. Take Profit: Calculated based on entry price and stop loss distance multiplied by the Risk/Reward Ratio.
🔹 Sell Setup

1. EMA Fast < EMA Slow → Downtrend condition.
2. Williams %R on the previous candle went above -20, and on the current candle, it crosses back below -20 → indicates renewed selling momentum.
3. Current price is below EMA Fast.
4. Entry Sell at the close of the candle where %R crosses below -20.
🎯 Entry, Stop Loss, and Take Profit
1. Entry: At the candle close where the signal occurs.
2. Stop Loss: At the highest high between the current and previous candles.
3. Take Profit: Calculated based on entry price and stop loss distance multiplied by the Risk/Reward Ratio.
⚙️ Optional Parameters

• Custom Risk/Reward Ratio for Take Profit.
• Option to add ATR buffer to Stop Loss.
• Adjustable EMA Fast period.
• Adjustable EMA Slow period.
• Adjustable Williams %R period.
• Option to enable Long only / Short only positions.
• Customizable Backtest start and end date.
• Customizable trading session time.
⏰ Alert Function
Alerts display:
• Entry price
• Stop Loss price
• Take Profit price
Guys, try adjusting the parameters yourselves!
I’ve been tweaking the settings for several days and managed to get great results on XAU/USD in the 5-minute timeframe.
I think this strategy is quite interesting and could potentially deliver good results on other instruments as well.
⚠️Disclaimer
This indicator is designed for educational and research purposes only.
It does not guarantee profits and should not be considered financial advice.
Trading in financial markets involves significant risk, including the potential loss of capital.
The main idea is “Trend-Following with Momentum Pullback.”
This means trading in the direction of the main trend (defined by EMA) while using Williams %R to identify pullback entries (buying the dip or selling the rally) where momentum returns to the trend direction.
📊 Indicators Used
1. EMA Fast – Defines the short-term trend.
2. EMA Slow – Defines the long-term trend (used as a trend filter).
3. Williams %R
• Overbought zone: above -20
• Oversold zone: below -80
⚙️ Entry Rules
🔹 Buy Setup
1. EMA Fast > EMA Slow → Uptrend condition.
2. Williams %R on the previous candle dropped below -80, and on the current candle, it crosses back above -80 → indicates momentum returning to the upside.
3. Current close is above EMA Fast.
4. Entry Buy at the close of the candle where %R crosses above -80.
🎯 Entry, Stop Loss, and Take Profit
1. Entry: At the candle close where the signal occurs.
2. Stop Loss: At the lowest low between the current and previous candles.
3. Take Profit: Calculated based on entry price and stop loss distance multiplied by the Risk/Reward Ratio.
🔹 Sell Setup
1. EMA Fast < EMA Slow → Downtrend condition.
2. Williams %R on the previous candle went above -20, and on the current candle, it crosses back below -20 → indicates renewed selling momentum.
3. Current price is below EMA Fast.
4. Entry Sell at the close of the candle where %R crosses below -20.
🎯 Entry, Stop Loss, and Take Profit
1. Entry: At the candle close where the signal occurs.
2. Stop Loss: At the highest high between the current and previous candles.
3. Take Profit: Calculated based on entry price and stop loss distance multiplied by the Risk/Reward Ratio.
⚙️ Optional Parameters
• Custom Risk/Reward Ratio for Take Profit.
• Option to add ATR buffer to Stop Loss.
• Adjustable EMA Fast period.
• Adjustable EMA Slow period.
• Adjustable Williams %R period.
• Option to enable Long only / Short only positions.
• Customizable Backtest start and end date.
• Customizable trading session time.
⏰ Alert Function
Alerts display:
• Entry price
• Stop Loss price
• Take Profit price
Guys, try adjusting the parameters yourselves!
I’ve been tweaking the settings for several days and managed to get great results on XAU/USD in the 5-minute timeframe.
I think this strategy is quite interesting and could potentially deliver good results on other instruments as well.
⚠️Disclaimer
This indicator is designed for educational and research purposes only.
It does not guarantee profits and should not be considered financial advice.
Trading in financial markets involves significant risk, including the potential loss of capital.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
Get access my indicator : bit.ly/411VJQB
telagram : t.me/Truth_indie
telagram : t.me/Truth_indie
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
Get access my indicator : bit.ly/411VJQB
telagram : t.me/Truth_indie
telagram : t.me/Truth_indie
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.