OPEN-SOURCE SCRIPT

NIFTY, SENSEX AND BANKNIFTY Options Expiry Marker

67
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

  1. ✅ Background Highlighting - Non-intrusive color shading on expiry days
  2. ✅ Multi-Index Support - NIFTY, BANKNIFTY, and SENSEX simultaneously
  3. ✅ Weekly & Monthly Expiry - Different transparency levels for easy distinction
  4. ✅ Customizable Expiry Days - Set any weekday (Mon-Fri) as expiry day
  5. ✅ Adjustable Transparency - Separate controls for weekly and monthly expiries
  6. ✅ Full Historical Data - Works on all visible bars across years
  7. ✅ Smart Monthly Detection - Automatically identifies last occurrence in month
  8. ✅ Color Coded - Blue (NIFTY), Red (BANKNIFTY), Green (SENSEX)



Use Cases

  1. Options trading strategy planning
  2. Identify expiry day volatility patterns
  3. Visual reference for monthly vs weekly cycles
  4. Backtest strategies around expiry days
  5. Track multiple index expiries on single chart


Technical Details
  1. Uses India timezone (GMT+5:30) for accurate date calculations
  2. Handles leap years automatically
  3. Smart algorithm identifies last weekday occurrence per month
  4. Works seamlessly on any chart timeframe (optimized for Daily)
  5. No performance impact - simple background coloring

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.