OPEN-SOURCE SCRIPT
RS Framework Entry Scanner

This script is an advanced trading strategy for TradingView using relative strength (RS) analysis and traditional technical indicators. It's designed to identify high-probability long and short entry points on the daily chart for swing trades lasting 5-15 days.
Key features and usage guide:
1. Relative Strength (RS) Scoring:
- Computes 3-month and 6-month RS vs a benchmark (default: RSP ETF)
- Stock gets +1 for each of: 3M RS > 0, 6M RS > 0
- Background color shows current RS regime
2. Technical Indicator Scoring:
- Stock gets +1 for each of:
- Price above 200 SMA (structural uptrend)
- MACD histogram > 0 (momentum)
- RSI between 40-75 (healthy, not overbought/oversold)
- Uses standard moving averages (200, 50, 20 EMA)
3. Entry Triggers:
- Looks for any of these patterns:
- EMA pullback: Price near the 20 EMA
- MACD cross: MACD histogram crossing 0 with volume
- Breakout: New high/low on increased volume
- Long entry: RS score ≥ 4/5 ("A" grade) + bullish trigger
- Short entry: RS score ≥ 4/5 ("A" grade) + bearish trigger
- Triangles mark entries, small circles show qualifying RS setups
4. Score Table:
- Summarizes current RS metrics, indicator scores, active triggers
- Color-codes pass/fail status for each factor
- Displays overall long/short scores, RS trend, trigger labels
To use in your trading:
1. Add the script to a daily chart of a stock or ETF
2. Adjust the benchmark symbol if needed (default: RSP)
3. Review the background color for overall RS regime
4. Check table for current RS metrics and setup grade
5. Look for large triangle entries with a qualifying score
6. Confirm volume and price action aligns with the signal
7. Place trade in direction of entry with 5-15 day horizon
8. Trail stop above/below relevant swing point or moving average
9. Consider taking partial profits at measured move targets
The script aims to put the odds in your favor by requiring multiple technical and relative strength factors to line up before giving an entry signal.
Key features and usage guide:
1. Relative Strength (RS) Scoring:
- Computes 3-month and 6-month RS vs a benchmark (default: RSP ETF)
- Stock gets +1 for each of: 3M RS > 0, 6M RS > 0
- Background color shows current RS regime
2. Technical Indicator Scoring:
- Stock gets +1 for each of:
- Price above 200 SMA (structural uptrend)
- MACD histogram > 0 (momentum)
- RSI between 40-75 (healthy, not overbought/oversold)
- Uses standard moving averages (200, 50, 20 EMA)
3. Entry Triggers:
- Looks for any of these patterns:
- EMA pullback: Price near the 20 EMA
- MACD cross: MACD histogram crossing 0 with volume
- Breakout: New high/low on increased volume
- Long entry: RS score ≥ 4/5 ("A" grade) + bullish trigger
- Short entry: RS score ≥ 4/5 ("A" grade) + bearish trigger
- Triangles mark entries, small circles show qualifying RS setups
4. Score Table:
- Summarizes current RS metrics, indicator scores, active triggers
- Color-codes pass/fail status for each factor
- Displays overall long/short scores, RS trend, trigger labels
To use in your trading:
1. Add the script to a daily chart of a stock or ETF
2. Adjust the benchmark symbol if needed (default: RSP)
3. Review the background color for overall RS regime
4. Check table for current RS metrics and setup grade
5. Look for large triangle entries with a qualifying score
6. Confirm volume and price action aligns with the signal
7. Place trade in direction of entry with 5-15 day horizon
8. Trail stop above/below relevant swing point or moving average
9. Consider taking partial profits at measured move targets
The script aims to put the odds in your favor by requiring multiple technical and relative strength factors to line up before giving an entry signal.
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.