Weekly timeframe on Tradingview show OHLC candles from Monday to Friday. NSE has index expiry dates on Thursday instead of Friday though. This script allows to plot OHLC candles with open on every Friday of the week and close on every Thursday of the week.