OPEN-SOURCE SCRIPT
Sector Rotation Radar XL Dashboard

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.
What it shows
• Top R.: Top/bottom “heat” badge (🔥 / ❄ / ▫️) + current rank
• Sector: Icon + ticker + sector name (e.g., 🔋
• Δ (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.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Setup + Risk Management + 1% better daily = Consistency. 📈
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Setup + Risk Management + 1% better daily = Consistency. 📈
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.