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が提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。