BENGALURU, Sept 24 Reuters Indian shares ended flat on Tuesday, having swung between slight gains and losses through the day, as the boost to metal stocks from China39;s new stimulus measures was offset by profitbooking, especially in banking and consumer stocks.

The Nifty 50 closed 0.01 higher at 25,940.4 points, while the SP BSE Sensex fell 0.02 at 84,914.04. They hit record highs near the open before then struggling to hold a firm direction.

Still, this was the fourth straight alltime high after the Federal Reserve39;s outsized rate cut last Wednesday sparked hopes of higher foreign inflows in Indian equities. However, the magnitude of the increase has been easing in each session.

The bigger boost on the day came after China, the top producer of several metals including steel and coal, unveiled a slew of measures to try to spur its sluggish economy.

Metal stocks jumped 3, the most among the 13 major sectors, to a near twomonth high. Heavyweights Tata Steel, Hindalco and JSW Steel rose between 0.5 and 4.

Analysts said that a growing domestic economy would likely stop Chinese steelmakers from dumping lowpriced steel in other countries, including India, in search of profits.

Besides, the recovery in China would strengthen export demand for the metals as well, said Ajit Mishra, senior vice president of research at Religare Broking.

Seven of the 13 major sectoral indexes showed gains.

The gains, however, were kept in check by a 0.8 drop in consumer stocks, as…