"Domestic markets will be range-bound in coming weeks, will take cues from U.S presidential elections," said Daljeet Singh Kohli, head of research at India Nivesh Securities.
The BSE index rose 0.04 percent, or 7.42 points, to end at 18,762.87 points, bringing its gains to 1.8 percent over the past four sessions.
The 50-share NSE index rose 0.11 percent, or 6.50 points, to 5,704.20, closing above the psychologically important 5,700 level for the first time since October 25, and has gained 1.9 percent over the previous four sessions.
Defensive stocks gained, with some consumer good companies favoured since they are seen as offering steadier returns and potential for growth.
Cigarette maker ITC rose 1.9 percent, while Colgate Palmolive
India rose 2.5 percent.
Drug makers also advanced, especially following good quarterly results announced recently.
Dr. Reddy's Laboratories rose 1.3 percent, advancing for a sixth consecutive session. India's no. 2 drugmaker posted on Tuesday a better-than-expected 32 percent rise in quarterly net profit.
Cipla rose 0.9 percent ahead of its quarterly earnings later in the day.
ACC rose 2 percent after October cement shipments rose by 3.5 percent to 2.04 million tonnes, a sturdier performance than expected.
Ambuja Cements gained 1.3 percent.
However, Bajaj Auto
dropped 2.1 percent on profit-taking after hitting all-time high on Friday, when the company had announced record domestic motorcycle sales for October.
Shares in Crompton Greaves
Ltd dropped 8.4 percent after the power equipment makers said on Friday net profit dropped 64 percent in the July-September quarter.
Citigroup downgraded Crompton Greaves to 'neutral' from 'buy' saying earnings were lower than expected due to losses and lower margins in its consumer business.
Public sector banks with disappointing July-September quarterly earnings fell.
Vijaya Bank shares fell 2.9 percent after reporting a 40 percent fall in September quarter net profit, while Allahabad Bank
shares fell 2.3 percent after reporting a 52 percent fall in July-September net profit.
Jubilant Foodworks fell 2.2 percent after Morgan Stanley downgraded the stock to "equal-weight" from overweight", citing a recent out-performance in the shares and an absence of near-term catalysts.