OPEN-SOURCE SCRIPT
NIFTY, SENSEX AND BANKNIFTY Options Expiry Marker

NSE Options Expiry Background Marker
Category: Date/Time Indicators
Timeframe: Daily
Markets: NSE (India) / Any Exchange
Description
Automatically highlights weekly and monthly options expiry days for NIFTY, BANKNIFTY, and SENSEX using color-coded background shading. Works across entire chart history with customizable transparency levels.
Key Features
Use Cases
Technical Details
Category: Date/Time Indicators
Timeframe: Daily
Markets: NSE (India) / Any Exchange
Description
Automatically highlights weekly and monthly options expiry days for NIFTY, BANKNIFTY, and SENSEX using color-coded background shading. Works across entire chart history with customizable transparency levels.
Key Features
- ✅ Background Highlighting - Non-intrusive color shading on expiry days
- ✅ Multi-Index Support - NIFTY, BANKNIFTY, and SENSEX simultaneously
- ✅ Weekly & Monthly Expiry - Different transparency levels for easy distinction
- ✅ Customizable Expiry Days - Set any weekday (Mon-Fri) as expiry day
- ✅ Adjustable Transparency - Separate controls for weekly and monthly expiries
- ✅ Full Historical Data - Works on all visible bars across years
- ✅ Smart Monthly Detection - Automatically identifies last occurrence in month
- ✅ Color Coded - Blue (NIFTY), Red (BANKNIFTY), Green (SENSEX)
Use Cases
- Options trading strategy planning
- Identify expiry day volatility patterns
- Visual reference for monthly vs weekly cycles
- Backtest strategies around expiry days
- Track multiple index expiries on single chart
Technical Details
- Uses India timezone (GMT+5:30) for accurate date calculations
- Handles leap years automatically
- Smart algorithm identifies last weekday occurrence per month
- Works seamlessly on any chart timeframe (optimized for Daily)
- No performance impact - simple background coloring
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。