OPEN-SOURCE SCRIPT

Sector SPDR ETFs

24
This script automatically identifies the SPDR sector ETF that corresponds to the currently viewed US stock ticker. It maps over 500 US-listed stocks to their respective SPDR sector ETFs — such as XLK (Technology), XLF (Financials), XLY (Consumer Discretionary), and others — based on pre-defined symbol lists.

When applied to a chart, the script displays a label below the last candle showing the SPDR sector symbol (e.g., "XLE" for Energy stocks like XOM). This allows traders and investors to quickly understand the sector classification of any stock they analyze.

Key Features:

  • Maps tickers to SPDR sector ETFs: XLC, XLY, XLP, XLE, XLF, XLV, XLI, XLB, XLRE, XLK, and XLU.
  • Displays the corresponding sector label on the chart.
  • Helpful for sector rotation strategies, macro analysis, or thematic investing.


免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。