* TSX up 4.87 points, or 0.04 percent, at 12,466.12
* Five of the index's 10 main groups advanced
* Encana touches highest level in more than a year
* Financial group up 0.65 pct, energy up 0.51 pct
By Solarina Ho
TORONTO, Oct 18 (Reuters) - Canada's main stock index squeezed out a marginal gain on Thursday as Encana Corp led energy companies higher following a takeover in the sector, but positive moves were tempered by lackluster gold miners, pressured by falling bullion prices.
The Toronto Stock Exchange's S&P/TSX composite index languished little changed for most of the session, and finished up 4.87 points, or 0.04 percent, at 12,466.12. This was the index's fourth straight positive finish and its highest close since Sept 14.
Five of the index's 10 main groups advanced.
Economic data out of China overnight showed more stable growth from the country, but worries about progress in the euro zone's debt crisis kept some market players on the sidelines.
"I think investors are taking a wait and see approach ... Most investors are in pause mode," said Youssef Zohny, portfolio manager at Stenner Investment Partners of Richardson GMP, but said signs of improvement out of China were beneficial to the commodities-heavy TSX index.
The financial sector, which makes up nearly a third of the index, finished 0.65 percent higher. The TSX gains were led by Royal Bank of Canada, which climbed 0.96 percent to C$58.75.
"It's a pretty stable sector in an otherwise trendless market," said Rick Hutcheon, president and chief operating officer at RKH Investments.
Oil and gas producer Encana was the second most influential gainer on the index, climbing 3.78 percent to C$23.64. The energy firm touched its highest level in more than a year earlier in the session, hitting C$23.85.
"Encana is up because Exxon Mobil is going to buy Celtic. Natural gas producers are being looked at favorably because of Exxon's move," said Hutcheon.
Exxon Mobil Corp agreed to buy Celtic Exploration Ltd for C$2.6 billion ($2.64 billion) on Wednesday, the latest foreign acquisition bid for a Canadian resource company.
The overall energy group was up 0.51 percent. Suncor Energy rose 0.65 percent to finish at C$33.82.
News that TransCanada Corp had shut down its major pipeline for moving Canadian crude oil from Alberta to the U.S. Midwest and Midcontinent after detecting a "small anomaly" on the pipe, helped lift benchmark oil prices well off the day's lows.
TransCanada shares were down 0.67 percent at C$44.29.
Gold miners, which fell 2.42 percent, kept gains in check. Six of the seven most influential decliners were gold companies. Goldcorp slid 2.61 percent to end at C$42.20, while Barrick Gold gave back 1.94 percent to close at C$38.37. Iamgold slumped 4.22 percent, to C$15.22.
The retreat tracked the bullion market, which consolidated gains after its recent rally, following weaker U.S. equities and uncertainty over Germany and France's commitment to battle the euro zone debt crisis.
The overall materials group, home to mining firms, slipped 1.24 percent.
Adding to the group's pressure was Potash Corp. The world's biggest fertilizer producer was down 1.14 percent at C$40.65.
Several analysts cut its stock price target and rating following comments by the company's chief executive that full-year earnings will fall below the low end of its previous forecast range.