Tata Steel, SBI, L&T and Sun Pharma advanced 2-5% each.
FIIs pump in Rs 2,075 crore in past three trading sessions.
The BSE mid-cap index ended higher by 1.2% or 83 points at 6,985 and the small-cap index advanced 0.9% or 62 points to close at 7,338.
The overall breadth was neutral as 1,514 stocks advanced while 1,321 declined.
Two of the world's most powerful economies -- the US and China -- will see key developments on the political front.
Markets ended flat amid a volatile trading session on Monday weighed down by banks and capital goods shares as investors turned cautious ahead of RBI's second quarter monetray policy review on Tuesday.
Jindal Steel was the top Sensex loser.
L&T top gainer among the Sensex stocks.
L&T and Infosys were the top gainer from the Sensex pack.
Markets ended flat amid a range bound trading session on Tuesday led by fast moving consumer goods shares.
Markets ended lower on Monday, amid profit taking at higher levels after sharp gains in the previous sessions, weighed down by fast moving consumer goods shares.
Broader markets outperformed.