OPEN-SOURCE SCRIPT
Trend Dip-Buyer

This strategy is a simplified, high-probability Dip Buying System designed for active growth stocks. Instead of chasing breakouts at the top, it waits for the stock to take a "breather" (pullback) within an uptrend and buys the discount.
It combines a classic Trend Filter (50 EMA) with a sensitive Momentum Oscillator (RSI 2) to pinpoint the exact moment a pullback is likely to reverse back up.
How It Works:
1. The Trend Filter (50 EMA)
The strategy ONLY trades Long.
It requires the price to be above the 50-period Exponential Moving Average (EMA) (Blue Line). This ensures you are trading with the momentum of the market, not against it.
2. The Dip Signal (RSI 2)
It uses a fast 2-period RSI.
When RSI(2) drops below 50, it signals that the stock is temporarily "oversold" or resting. This is your cue that a discount entry is available.
3. Dynamic Exits
Profit Taking: The primary target is dynamic. The strategy looks to exit when RSI(2) spikes above 70, allowing you to capture the bulk of the momentum swing. (A fixed ATR target option is also included).
Safety: A 3x ATR Stop Loss protects the trade from sudden reversals.
✅ Simple Entry Checklist
Before taking a trade, ensure all 3 boxes are checked:
[ ] Trend Check: Is the current price ABOVE the Blue Line (50 EMA)?
[ ] Dip Check: Is the RSI (2) value BELOW 50?
[ ] Time Check: Is it past 12:00 PM? (Recommended for cleaner trends, but optional).
👉 If YES to all: Enter Long on the next candle open.
Best Settings (Customizable):
RSI Threshold: Default is 50 (Balanced). Lower to 30 for fewer, higher-quality trades.
Exit Method: "RSI > 70" is recommended for maximizing wins in strong trends.
Time Filter: "Trade > 12pm" is enabled by default to avoid morning volatility.
It combines a classic Trend Filter (50 EMA) with a sensitive Momentum Oscillator (RSI 2) to pinpoint the exact moment a pullback is likely to reverse back up.
How It Works:
1. The Trend Filter (50 EMA)
The strategy ONLY trades Long.
It requires the price to be above the 50-period Exponential Moving Average (EMA) (Blue Line). This ensures you are trading with the momentum of the market, not against it.
2. The Dip Signal (RSI 2)
It uses a fast 2-period RSI.
When RSI(2) drops below 50, it signals that the stock is temporarily "oversold" or resting. This is your cue that a discount entry is available.
3. Dynamic Exits
Profit Taking: The primary target is dynamic. The strategy looks to exit when RSI(2) spikes above 70, allowing you to capture the bulk of the momentum swing. (A fixed ATR target option is also included).
Safety: A 3x ATR Stop Loss protects the trade from sudden reversals.
✅ Simple Entry Checklist
Before taking a trade, ensure all 3 boxes are checked:
[ ] Trend Check: Is the current price ABOVE the Blue Line (50 EMA)?
[ ] Dip Check: Is the RSI (2) value BELOW 50?
[ ] Time Check: Is it past 12:00 PM? (Recommended for cleaner trends, but optional).
👉 If YES to all: Enter Long on the next candle open.
Best Settings (Customizable):
RSI Threshold: Default is 50 (Balanced). Lower to 30 for fewer, higher-quality trades.
Exit Method: "RSI > 70" is recommended for maximizing wins in strong trends.
Time Filter: "Trade > 12pm" is enabled by default to avoid morning volatility.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.