OPEN-SOURCE SCRIPT
更新済 Sector Rotation Dashboardr

Sector Rotation Dashboard
Understanding where institutional money is moving before and after the opening bell gives traders a massive edge. This indicator is a real-time capital rotation tracker that maps the relative performance of all 11 Select Sector SPDR ETFs (representing the entire S&P 500) across all trading sessions.
Unlike standard dashboards that only look at regular market data, this script dynamically loops in premarket and after-hours data, updating relative performance calculations dynamically on every tick.
How It Works
The script actively fetches performance data by comparing the current extended hours or regular session price against the previous regular session close. It automatically pulls and handles 11 critical market sectors:
Technology (XLK)
Financials (XLF)
Health Care (XLV)
Consumer Discretionary (XLY)
Consumer Staples (XLP)
Energy (XLE)
Utilities (XLU)
Industrials (XLI)
Materials (XLB)
Real Estate (XLRE)
Communication Services (XLC)
Key Features
Live Session Tracking: Built-in intelligence automatically detects whether the market is in Premarket Hours, Regular Market Hours, or After Hours based on exchange times.
Real-time Bubble Sort Engine: The script actively sorts the 11 sectors from strongest to weakest on the last bar, so the leading sectors are always pushed to the top of your UI.
Automated Capital Rotation Insight: At the bottom of the table, a dynamic AI-style macro text block summarizes the state of the market. For example, it might read: "During Premarket Hours, capital is rotating heavily into Technology (XLK)... Conversely, liquidity is draining from Utilities (XLU)."
Fully Customizable UI: Change the dashboard placement (Top Right, Bottom Left, etc.) and text scaling seamlessly via the script settings to perfectly fit your workspace layout.
How to Trade with It
Spot Early Momentum (Premarket): Look at the dashboard 30–60 minutes before the open. If Defensive sectors (XLU, XLP) are leading while Aggressive sectors (XLK, XLY) are bleeding liquidity, expect a risk-off environment at the opening bell.
Relative Strength / Weakness Trading: When looking for long setups, focus on individual stocks inside the top 2 leading sectors. For shorting or put options, look at names within the lagging bottom sectors.
Identify Intraday Rotations: Watch for shifts during regular market hours where a beaten-down sector suddenly starts climbing the ladder, signaling algorithmic or institutional accumulation.
Developer Note: Uses optimized request.security structures to pull seamless extended historical data without dragging down chart loading speeds or causing layout shifting.
Understanding where institutional money is moving before and after the opening bell gives traders a massive edge. This indicator is a real-time capital rotation tracker that maps the relative performance of all 11 Select Sector SPDR ETFs (representing the entire S&P 500) across all trading sessions.
Unlike standard dashboards that only look at regular market data, this script dynamically loops in premarket and after-hours data, updating relative performance calculations dynamically on every tick.
How It Works
The script actively fetches performance data by comparing the current extended hours or regular session price against the previous regular session close. It automatically pulls and handles 11 critical market sectors:
Technology (XLK)
Financials (XLF)
Health Care (XLV)
Consumer Discretionary (XLY)
Consumer Staples (XLP)
Energy (XLE)
Utilities (XLU)
Industrials (XLI)
Materials (XLB)
Real Estate (XLRE)
Communication Services (XLC)
Key Features
Live Session Tracking: Built-in intelligence automatically detects whether the market is in Premarket Hours, Regular Market Hours, or After Hours based on exchange times.
Real-time Bubble Sort Engine: The script actively sorts the 11 sectors from strongest to weakest on the last bar, so the leading sectors are always pushed to the top of your UI.
Automated Capital Rotation Insight: At the bottom of the table, a dynamic AI-style macro text block summarizes the state of the market. For example, it might read: "During Premarket Hours, capital is rotating heavily into Technology (XLK)... Conversely, liquidity is draining from Utilities (XLU)."
Fully Customizable UI: Change the dashboard placement (Top Right, Bottom Left, etc.) and text scaling seamlessly via the script settings to perfectly fit your workspace layout.
How to Trade with It
Spot Early Momentum (Premarket): Look at the dashboard 30–60 minutes before the open. If Defensive sectors (XLU, XLP) are leading while Aggressive sectors (XLK, XLY) are bleeding liquidity, expect a risk-off environment at the opening bell.
Relative Strength / Weakness Trading: When looking for long setups, focus on individual stocks inside the top 2 leading sectors. For shorting or put options, look at names within the lagging bottom sectors.
Identify Intraday Rotations: Watch for shifts during regular market hours where a beaten-down sector suddenly starts climbing the ladder, signaling algorithmic or institutional accumulation.
Developer Note: Uses optimized request.security structures to pull seamless extended historical data without dragging down chart loading speeds or causing layout shifting.
リリースノート
Fixed chart displayリリースノート
Fixing chartオープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。