OPEN-SOURCE SCRIPT

Sector Rotation Radar XL Dashboard

1 305
This script is a compact sector rotation dashboard built around the classic *SPDR sector ETFs (XL)**. It ranks sectors by a weighted Relative Strength score versus a benchmark (default: SPY) and adds quick context via trend/breadth filters.

What it shows
• Top R.: Top/bottom “heat” badge (🔥 / ❄ / ▫️) + current rank
• Sector: Icon + ticker + sector name (e.g., 🔋 XLE (Energy))
• Δ (Rank change): Rank movement vs a user-defined lookback
• MA50 / MA200: ✅ / ❌ plus % distance above/below each MA
• Score: Weighted RS momentum score (multi-lookback)
• RS/SPY: Relative Strength ratio vs the benchmark
• YTD: Year-to-date performance (fixed to 1 decimal)

Breadth row (Market State)
The header line shows MA200 breadth (how many sectors are above their MA200), a simple Risk-on / Risk-off / Neutral label based on thresholds, and the change vs the prior bar.

How to use (practical)
• Use the rank + score to identify sector leadership/weakness.
• Use Δ to spot rotation in progress (leaders gaining/losing rank).
• Use MA50/MA200 % distance to confirm trend alignment and avoid chasing extended moves.
• Use breadth to understand whether leadership is broad or narrow.

Settings
• Benchmark symbol (default SPY)
• Compute on Current TF or Weekly
• Lookbacks + weights for the Score
• ΔRank lookback
• Table position / padding / font size / colors
• Universe presets (All / Cyclical / Defensive) + per-sector toggles
• Optional alerts: Leader change, Top 3 change, Risk-on/off flips

Notes / Disclaimer
This indicator is for educational and informational purposes only. It does not provide trade signals or recommendations. Always do your own research, confirm with additional tools, and manage risk appropriately.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.