Stock Sector ETF with Indicators

---
Key Features
Automatic Sector Detection:
- Fetches the sector of the current asset (e.g., "Technology" for AAPL).
- Maps the sector to a user-defined ETF (default: SPDR sector ETFs)[using close prices].
Technical Indicators:
- Simple Moving Average (SMA): Tracks the ETF’s trend.
- Bollinger Bands: Highlights volatility and potential reversals.
- Donchian High (52-Week High): Identifies long-term resistance levels.
Customizable Inputs:
- Adjust indicator parameters (length, visibility).
- Override default ETFs for specific sectors.
Informative Table:
- Displays the current sector and ETF symbol in the bottom-right corner.
---
Input Settings
SMA Settings
- SMA Length: Period for calculating the Simple Moving Average (default: 200).
- Show SMA: Toggle visibility of the SMA line.
Bollinger Bands Settings
- BB Length: Period for Bollinger Bands calculation (default: 20).
- BB Multiplier: Standard deviation multiplier (default: 2.0).
- Show Bollinger Bands: Toggle visibility of the bands.
Donchian High (52-Week High)
- Daily High Length: Days used to calculate the high (default: 252, approx. 1 year).
- Show High: Toggle visibility of the 52-week high line.
Sector Selections
- Customize ETFs for each sector (e.g., replace XLU with another utilities ETF).
---
Example Use Cases
- Trend Analysis: Compare a stock’s price action to its sector ETF’s SMA for trend confirmation.
- Volatility Signals: Use Bollinger Bands to spot ETF price squeezes or breakouts.
- Sector Strength: Monitor if the ETF is approaching its 52-week high to gauge sector momentum.
Enjoy tracking sector trends with ease! 🚀
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.