Toronto stocks nudged ahead Wednesday, as a drop in the energy sector largely offset gains in the materials index.

The S&P/TSX composite index fell 17.19, or 0.15%, to 11,675.16, after hitting a new record high of 11,800.15 in morning trading.

Volume on the senior exchange was 386 million shares.

Six of the 10 TSX main sub-groups moved ahead, but the energy sector dropped 1.93%.

Light, sweet crude for March delivery fell 10¢ to US$66.75 a barrel on the New York Mercantile Exchange.

Ivanhoe Energy Inc. said testing of a deep gas well in California had yielded disappointing results. Shares fell 48¢, or 15.58%, to $2.60.

Shell Canada lost 93¢ to $44.32 though it reported a profit came of over $2 billion for the year.

Western Oil Sands dropped 61¢, or 1.75%, to $34.19.

The materials index, meanwhile, moved ahead 1.46%. Gold futures rose $4.40 to US$562.50 an ounce.

Eldorado Gold Corp. advanced 24¢, or 4.48%, to $5.60.

Agrium Inc. has boosted its takeover bid for distributor Royster-Clark Ltd. to $616 million from $570 million and extended the offer until Feb. 8. Agrium advanced 27¢, or 1.04%, to $26.15, while Royster gained $1.06, or 9.77%, to $11.91.

Canadian National Railways reported a 14% quarterly profit increase, announced a two-for-one share split and a 30% rise in dividend payment. CN gained $4.91, or 5.10%, to $101.24.

The Canadian dollar closed up 0.07¢ at US86.84¢.

The S&P/TSX Venture composite index finished up 7.89, or 0.32%, to 2,473.60.

In New York, markets were flat despite strong corporate earnings, as a report said housing sales of pre-existing homes was down.

The Dow Jones industrial average fell 2.48, or 0.02%, to 10,709.74, the S&P500 index fell 2.18, or 0.17%, to 1,264.68 and the Nasdaq composite index fell 4.60, or 0.2%, to 2,260.65.

U.S. National Association of Realtors reported that sales of previously owned homes and condos dropped by 5.7% in December from the previous month. It marked the third straight monthly decline.