BENGALURU, July 30 (Reuters) - Indian shares were flat on Tuesday as investors continued to book profits with the benchmarks near all-time highs, negating the effect of some upbeat quarterly reports and the rise in energy stocks.

The NSE Nifty 50 was up 0.08% to 24,853.1 points as of 9:56 a.m. IST, while the S&P BSE Sensex added 0.08% to 81,417.

The indexes hit all-time highs on Monday, with the Nifty a hair's breadth away from the 25,000-points mark, before they ended little changed as profit booking sparked a sharp pullback.

"We are of the view that the intraday market texture is non-directional and hence, buying on intraday correction and selling on rallies would be the ideal strategy for traders," said Shrikant Chouhan, head of equity research at Kotak Securities.

The Nifty's relative strength index (RSI) is at 71, which is a signal that the security is overbought, according to LSEG data.

"Profit-booking at record-high levels will continue as the markets are in overbought territory," said Vinod Nair, head of research at Geojit Financial Services.

The broader, more domestically focussed small- and mid-caps rose 0.6% and 0.4%, respectively.

Six of the 13 major sectors logged losses on the day.

The gainers included energy and public sector companies, which rose 1.5% each.

NTPC jumped 3.2%, adding to its 8.7% rise in the previous session after the state-owned power generator reported higher quarterly results.

Bharat Petroleum Corp Ltd (BPCL), Hindustan Petroleum Corp Ltd (HPCL) and Indian Oil Corp (IOC) gained 1.4%-3.8%.

UBS upgraded HPCL and IOC to 'buy' and raised its target price on all three stocks, expecting gains in their marketing segment.

BPCL and NTPC were the top two Nifty 50 gainers.

Colgate Palmolive India gained 6% after reporting a higher quarterly profit, helped by price hikes.

Pfizer Ltd jumped 3% after it also reported a higher first-quarter profit. (Reporting by Bharath Rajeswaran in Bengaluru; Editing by Sherry Jacob-Phillips and Savio D'Souza)