A lot of money could be saved/earned if you are weekly option buyer/option seller out there especially if you trade the last 30minute of the trade when comes to Indian Markets.
So what is so special about the last 30 min of trade? The key lies in the Daily settlement price which is based on the last hour of the settlement close.
How is the settlement price in Indian market decided?
Daily Settlement / Weekly Expiry Settlement is decided based on the basis of last half an hour Volume weighted average price of such contract and this rule is applicable for both index and stock futures
Last Traded Price – Refers to the closing price of future contract at market close
Settlement Price – Refers to the last 30min – VWAP based adjusted price after the market close.

How to use Amibroker to Predict the VWAP based settlment close?
Since the last 30min VWAP based settlement is a bunch of calculations one can easily arrive at the estimation of settlement close easier before the exchange shows the settlement close. Consider last Friday’s price movement in the last 30 min.
Learn how to calculate VWAP here
Nifty Futures 1min Charts with last 30min VWAP Calculation

In the last 30min price fallen faster from 11930 – 11875 levels. But just look into the VWAP levels around 15.25p.m or even 15.28p.m before the market close. Price is falling faster however VWAP is trading above 11900 levels thats a 20-25 points difference likely difference between the closing price and settlement price.
And there are times if there is any faster fall or faster rise in the last 30min there will be a considerable difference in the Future Price & Settlement price. And especially on the expiry days, STT Transactions fees will be factored in the ITM options.
so if you have a fair idea about how the STT Transaction + VWAP settlement close will impact the option pricing as an option buyer/option seller one can strategically choose their gameplay accordingly especially if you are trading in the last 30min of trading on the expiry day.
From an option buyer perspective lot of money could be saved if they are trading the ATM Options or slightly ITM Options especially in the last 30min of trading. And for Option settlers, it brings maximum advantage especially STT Transaction charges + VWAP settlement mostly works in their favor unless there is a dramatic fall in the last 15min of trading.
Here is the simple VWAP afl to predict/estimate the settlement close before the market closes.
The following Amibroker AFL code works only in 1min, 2min, 5min timeframe
And also goto Amibroker Preferences -> Tools -> Intraday -> Select Start time of the Interval else VWAP plot will not be calculated.