OPEN-SOURCE SCRIPT
Diupdate 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.
Catatan Rilis
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.
Catatan Rilis
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.
Catatan Rilis
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.
Catatan Rilis
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.
Catatan Rilis
🆕 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.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.