OPEN-SOURCE SCRIPT
Güncellendi 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.
Sürüm Notları
Fixed chart displaySürüm Notları
Fixing chartAçık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.