The 30-share Sensex was trading 149.75 points or 0.37 per cent higher at 40,562.32 in morning trade.
After swinging nearly 330 points, the Sensex finished 172.69 points or 0.43 per cent higher at 40,412.57.
Forex traders said investors were optimistic about the US-China trade talks.
The appreciating rupee and mixed leads from other Asian markets too influenced sentiment, traders said.
Forex traders said the Indian rupee gained ground on the back of stable crude oil prices and a weaker dollar index.
BSE Sensex closed 247.55 points or 0.61 per cent lower at 40,239.88.
The 30-share index was trading 33.67 points or 0.08 per cent lower at 40,453.76 in morning trade.
According to sources, exchanges system is not able to handle such a large number of transactions at the closing time.
The upgrade to BS VI technology has resulted in a price increase of around `4,420 over the BS IV model.
Inflows to income/debt-oriented schemes of Rs 51,427.58 crore helped industry AUM cross Rs 27 lakh crore milestone.