OPEN-SOURCE SCRIPT
Market Strength Buy Sell Indicator [TradeDots]

A specialized tool designed to assist traders in evaluating market conditions through a multifaceted analysis of relative performance, beta-adjusted returns, momentum, and volume—allowing you to identify optimal points for long or short trades. By integrating multiple benchmarks (default S&P 500) and percentile-based thresholds, the script provides clear, actionable insights suitable for both day trading and higher-level timeframe assessments.
📝 HOW IT WORKS
1. Multi-Factor Composite Score
2. Intraday & Day Trading Focus
3. Higher Timeframe Monitoring
4. Pair Trading Applications
4. Color-Coded Signals & Alerts
⚙️ HOW TO USE
1. Select Your Timeframe: For scalping or day trading, lower intervals (e.g., 5-minute) offer immediate data resets at the session’s start. For multi-day insight, daily or weekly charts reveal broader performance trends.
2. Watch Key Levels Around 50: Intraday dips under 50 may be a cue to consider short trades, while bounces above 50 can confirm renewed strength.
3. Assess Benchmark Relationships: Compare your asset’s score and signals to the broader market. A stock falling below its pair’s relative strength line might lag overall market momentum.
4. Combine Tools & Validate: This script excels when integrated with other technical analysis methods (e.g., support/resistance, chart patterns) and fundamental factors for a holistic market view.
❗ LIMITATIONS
RISK DISCLAIMER
All forms of trading and investing involve risk, including the possible loss of principal. This indicator analyzes relative performance but cannot assure profits or eliminate losses. Past performance of any strategy does not guarantee future results. Always combine analysis with proper risk management and your broader trading plan. Consult a licensed financial advisor if you are unsure of your individual risk tolerance or investment objectives.
📝 HOW IT WORKS
1. Multi-Factor Composite Score
- Relative Performance (RS Ratio): Compares your asset’s performance to a chosen benchmark (default: SPY). Values above 1.0 indicate outperformance, while below 1.0 suggest underperformance.
- Beta-Adjusted Returns: Checks the ticker’s excess movement relative to expected market-related moves. This helps distinguish pure “alpha” from broad market effects.
- Volume & Correlation: Volume spikes often confirm the momentum behind a move, while correlation measures how closely the asset tracks or diverges from its benchmark.
- These components merge into a 0–100 composite score. Scores above 50 frequently imply bullish strength; drops below 50 often point to underperformance—potentially flagging short opportunities.
2. Intraday & Day Trading Focus
- Monitoring Below 50: During the trading day, the script calculates live data against the benchmark, offering an intraday-sensitive composite score. A dip under 50 may indicate a short bias for that session, especially when accompanied by high volume or momentum shifts.
3. Higher Timeframe Monitoring
- Daily Strategies: On daily or weekly charts, the script reveals overall relative strength or weakness compared to the S&P 500. This higher-level perspective helps form broader trading biases—crucial for swing or position trades spanning multiple days.
- Long/Short Thresholds: Persistent readings above 50 on a daily chart typically reinforce a long bias, while consistent dips below 50 can sustain a short or cautious outlook.
4. Pair Trading Applications
- Custom Benchmark Selection: By setting a specific ticker pair as your benchmark instead of the default S&P 500, you can identify spread trading opportunities between two correlated assets. This allows you to go long the outperforming asset while shorting the underperforming one when the spread reaches extreme levels.
4. Color-Coded Signals & Alerts
- Visual Zones (25–75): Color-coded bands highlight strong outperformance (above 75) or pronounced underperformance (below 25).
- Alerts on Strong Shifts: Automatic alerts can notify you of sudden entries or exits from bullish or bearish zones, so you can potentially act on new market information without delay.
⚙️ HOW TO USE
1. Select Your Timeframe: For scalping or day trading, lower intervals (e.g., 5-minute) offer immediate data resets at the session’s start. For multi-day insight, daily or weekly charts reveal broader performance trends.
2. Watch Key Levels Around 50: Intraday dips under 50 may be a cue to consider short trades, while bounces above 50 can confirm renewed strength.
3. Assess Benchmark Relationships: Compare your asset’s score and signals to the broader market. A stock falling below its pair’s relative strength line might lag overall market momentum.
4. Combine Tools & Validate: This script excels when integrated with other technical analysis methods (e.g., support/resistance, chart patterns) and fundamental factors for a holistic market view.
❗ LIMITATIONS
- No Direction Guarantee: The indicator identifies relative strength but does not guarantee directional price moves.
- Delayed Updates: Since calculations update after each bar close, sudden intrabar changes may not immediately reflect.
- Market-Specific Behaviors: Some assets or unusual market conditions may deviate from typical benchmarks, weakening signal reliability.
- Past ≠ Future: High or low relative strength in the past may not predict continued performance.
RISK DISCLAIMER
All forms of trading and investing involve risk, including the possible loss of principal. This indicator analyzes relative performance but cannot assure profits or eliminate losses. Past performance of any strategy does not guarantee future results. Always combine analysis with proper risk management and your broader trading plan. Consult a licensed financial advisor if you are unsure of your individual risk tolerance or investment objectives.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.