OPEN-SOURCE SCRIPT
Telah dikemas kini 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.
Nota Keluaran
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.
Nota Keluaran
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.
Nota Keluaran
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.
Nota Keluaran
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.
Nota Keluaran
🆕 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 sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.