Nifty also touched a new intra-day all-time high of 15,773.45 points.
It closed at 15,751.65, higher by 81.40 points, or 0.52 per cent, from its previous close of 15,670.25 points.
Sensex closed at 52,328.51, higher by 228.46 points, or 0.44 per cent, from its previous close of 52,100.05.
It had opened at 52,231.38 and touched an intra-day high of 52,378.69 and a low of 52,054.76 points.
Kotak Securities' Executive Vice President, Equity Technical Research, Shrikant Chouhan, said: "For the third consecutive day, the market has managed to register a new high. Today, the Nifty/Sensex went to 15,773/52,378, before again correcting back to 15,750/52,330 levels. However, the trading range is not expanding, which is an indication of cautiousness at higher levels."
"Today, the power and energy-related stocks did extremely well, and we saw some interesting buying in technology companies. The market breadth remained strong."
The top gainers on the Sensex were Power Grid, NTPC, and UltraTech Cement, while the major losers were Bajaj Finance, Bajaj Finserv, and HDFC.