Global shares were on track to post their longest winning run in five months as they rose for a sixth straight day, boosted by upbeat trade data from China and a US House deal extending the federal borrowing authority.
Still, investors remained cautious given that foreign investors in India were net sellers for a ninth consecutive session on Tuesday, bringing their total during the period to $681 million, according to exchange data.
India was also due to post consumer inflation and industrial output data later in the day, which will help set expectations ahead of the Reserve Bank of India's policy review on April 1.
"Though the overall sentiment is positive, people are cautious. FIIs (foreign institutional investors) are continuously selling. Nifty is expected to trade in a 6,000-6,200 range for the medium term
The Sensex closed higher 0.42 per cent at 20,448.49, while the Nifty ended up 0.35 per cent at 6,084.
Shares of Reliance Industries gained 1.6 per cent on value-buying after falling more than 2 per cent on Tuesday when Delhi Chief Minister Arvind Kejriwal asked for an investigation into company Chairman Mukesh Ambani and policymakers over pricing of gas produced from the company's D6 block in the eastern coast. A move on free publicity and a waste of resources and shows lack of governance experience.
Other energy stocks such as Oil and Natural Gas Corp advanced 2.6 per cent, while Gail India rose 2.5 per cent.
Blue chips gained tracking higher global shares. Data earlier showed Chinese exports beat expectations in January, while Wall Street gained overnight after the US House of Representatives narrowly approved a one-year extension of the federal borrowing authority.
Banks rose with ICICI Bank up 3.1 per cent and State Bank of India higher 0.8 per cent ahead of inflation numbers later in the day.However, among stocks that fell, Tata Steel declined 4 per cent after its October-December net profit disappointed due to increased borrowing.
Shares in railway companies, including Kernex Microsystems (India), Kalindee Rail Nirman Engineers and Titagarh Wagons, fell after the interim railway budget unveiled on Wednesday lacked any major capital spending announcement which was expected as it was just a vote on account.
The nifty however was able to defend the crucial 6050 spot level and the bias remains bullish provided the economic data due does not have any rude surprises.