This is like quite a tricky thing, posting link where we have explained the reason for this:
http://tradingqna.com/26497/does-charts-same-timeframe-look-different-the-same-platform
So the candles that we form is done by the ticks received on our our OMS may be 5 to 6 ticks a second. On the actual exchange there could be thousands of ticks. So the minute/hour/ candles are formed by the data we received.
At the end of every day, we sync the daily candle with the exchange bhav copy to make sure we are in sync. So the daily OHLC will match the exchange OHLC declared on Bhav after market closing.
But exchange doesn't give out any minute or hour bhav copy, so it is technically not possible to have this match with exchange. Not just us, but any other charting platform.
The only way it is possible is if the data vendor is Tick by Tick data vendor from the exchange. I guess the only ones in India are esignal, who charge Rs 10k+ per month for data.