* Stocks gain after Bernanke says rates to remain low
* US dollar slips vs euro on news of record-low home sales
* Bond losses erased after new U.S. homes sales drop
* Oil prices edge higher before release of crude stocks (Updates with U.S. markets, changes byline; dateline previously LONDON)
By Herbert Lash
NEW YORK, Feb 24 (Reuters) - The U.S. dollar fell and stocks edged higher on Wednesday after Federal Reserve Chairman Ben Bernanke reiterated his commitment to keep interest rates at very low levels for an extended time.
But Wall Street trimmed strong opening gains and European shares dipped back into negative territory after new U.S. home sales unexpectedly dropped to a record low in January, suggesting potential trouble for the housing recovery. For details see: [ID:nN24373288]
The dollar fell against the yen and euro on news that sales of newly built U.S. single-family dropped 11.2 percent to a 309,000 unit annual rate, the lowest level since records started in January 1963.
The dollar fell to 89.81 yen
U.S. Treasuries also erased modest losses on news that new U.S. home sales fell sharply.
Benchmark 10-year Treasury notes
Investors had taken a wait-and-see approach this week before Bernanke started his semiannual testimony on monetary policy and the state of the economy before the U.S. House Financial Services Committee.
In prepared comments Bernanke said a weak job market and low inflation are likely to warrant exceptionally low levels of the key federal funds rate for an extended period of time. [ID:nN23153536]
Bernanke told lawmakers that he stood prepared to continue supporting the economy with extraordinary stimulus for some time, but also argued the Fed possesses a broad array of tools to remove such accommodation when the time is right.
"The Fed is trying to back away from its liquidity measures and to reduce its balance sheet somewhat, but the Fed is going keep rates low for an extended period," said John Canally, investment strategist at LPL Financial in Boston.
"By keeping that language, that's what helping the markets from the new home sales number," Canally said.
The Dow Jones industrial average <.DJI> was up 37.94 points, or 0.37 percent, at 10,320.35. The Standard & Poor's 500 Index <.SPX> was up 3.06 points, or 0.28 percent, at 1,097.66. The Nasdaq Composite Index <.IXIC> was up 11.72 points, or 0.53 percent, at 2,225.16.
MSCI's index of world stocks <.MIWD00000PUS> turned higher, gaining 0.2 percent.
Oil rose slightly, reining in earlier losses, as a strike at Total's French refineries looked set to end.
Oil market players were waiting for information on U.S. crude inventories in the week to Feb. 19 from figures due later in the day from the Energy Information Administration (EIA).
U.S. light sweet crude oil for April delivery
Gold pared some early losses as the dollar weakened against the euro.
Spot gold prices