OPEN-SOURCE SCRIPT
Aktualisiert EMA21 Pullback Buy

EMA21 Pullback Buy is a tool designed to identify constructive pullbacks to the 21-period EMA in strong uptrends.
It highlights candles where:
• The previous close was above EMA21
• The current low touches or dips below EMA21
• The candle closes back above EMA21
These candles are considered potential “support tests” in a trending stock.
You can configure a maximum number of valid tests to avoid late-stage entries.
The script:
• Colors the test candles (optional)
• Marks them with a small circle
• Triggers a buy signal (green triangle) on the first bullish candle that breaks above the test candle’s high
Optional alerts are included for both:
• New EMA21 test
• Buy trigger after valid test
The goal is to help traders find low-risk entries in clean, trending stocks — without chasing breakouts or reacting emotionally. Best used with strong RS names and proper trend context.
It highlights candles where:
• The previous close was above EMA21
• The current low touches or dips below EMA21
• The candle closes back above EMA21
These candles are considered potential “support tests” in a trending stock.
You can configure a maximum number of valid tests to avoid late-stage entries.
The script:
• Colors the test candles (optional)
• Marks them with a small circle
• Triggers a buy signal (green triangle) on the first bullish candle that breaks above the test candle’s high
Optional alerts are included for both:
• New EMA21 test
• Buy trigger after valid test
The goal is to help traders find low-risk entries in clean, trending stocks — without chasing breakouts or reacting emotionally. Best used with strong RS names and proper trend context.
Versionshinweise
EMA21 Pullback Buy is a tool designed to identify constructive pullbacks to the 21-period EMA in strong uptrends.It highlights candles where:
• The previous close was above EMA21
• The current low touches or dips below EMA21
• The candle closes back above EMA21
These candles are considered potential “support tests” in a trending stock.
You can configure a maximum number of valid tests to avoid late-stage entries.
The script:
• Colors the test candles (optional)
• Marks them with a small circle
• Triggers a buy signal (green triangle) on the first bullish candle that breaks above the test candle’s high
Optional alerts are included for both:
• New EMA21 test
• Buy trigger after valid test
The goal is to help traders find low-risk entries in clean, trending stocks — without chasing breakouts or reacting emotionally. Best used with strong RS names and proper trend context.
Versionshinweise
Version: v1.1Date: 2025-12-11
What’s new:
🔹 Trend Sensitivity Option
You can now choose between three levels of trend strictness:
• Strict – Requires clear uptrend structure with slope and strength
• Moderate – Looser, still prefers alignment between EMAs
• Loose – Only checks that price is above EMA21
This allows you to adapt the indicator to different market conditions (e.g. choppy vs trending).
🔹 Optional EMA10 Momentum Filter
When enabled, the indicator will also require the 10 EMA to be rising, confirming short-term momentum.
This helps avoid noisy signals during weak consolidations or fake reversals.
🧠 These additions improve signal quality and give you better control over the type of pullbacks you want to trade.
No changes were made to entry logic or alerts.
Versionshinweise
Version: v1.1Date: 2025-12-11
What’s new:
🔹 Trend Sensitivity Option
You can now choose between three levels of trend strictness:
• Strict – Requires clear uptrend structure with slope and strength
• Moderate – Looser, still prefers alignment between EMAs
• Loose – Only checks that price is above EMA21
This allows you to adapt the indicator to different market conditions (e.g. choppy vs trending).
🔹 Optional EMA10 Momentum Filter
When enabled, the indicator will also require the 10 EMA to be rising, confirming short-term momentum.
This helps avoid noisy signals during weak consolidations or fake reversals.
🧠 These additions improve signal quality and give you better control over the type of pullbacks you want to trade.
No changes were made to entry logic or alerts.
Versionshinweise
Version: v1.1Date: 2025-12-11
What’s new:
🔹 Trend Sensitivity Option
You can now choose between three levels of trend strictness:
• Strict – Requires clear uptrend structure with slope and strength
• Moderate – Looser, still prefers alignment between EMAs
• Loose – Only checks that price is above EMA21
This allows you to adapt the indicator to different market conditions (e.g. choppy vs trending).
🔹 Optional EMA10 Momentum Filter
When enabled, the indicator will also require the 10 EMA to be rising, confirming short-term momentum.
This helps avoid noisy signals during weak consolidations or fake reversals.
🧠 These additions improve signal quality and give you better control over the type of pullbacks you want to trade.
No changes were made to entry logic or alerts.
Versionshinweise
🆕 Update: Optional Limit for Number of EMA21 TestsVersion: v1.2
Date: 2025-12-11
What’s new:
🔹 Configurable limit for EMA21 tests
Added a new setting:
Limit max number of EMA21 tests – when enabled, the script will only allow a defined number of pullback tests (default: 6) during a trend phase.
If disabled, all valid pullbacks will trigger, even late-stage entries in longer uptrends.
✅ This gives you more control:
• Want to focus only on early pullbacks? Keep it enabled.
• Want to capture all setups in a strong trend? Disable it.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.