Stocks gained modestly on Tuesday, as better-than-expected consumer confidence data offset a separate report showing flat home prices in October.

The S&P/Case-Shiller composite index of home prices in 20 metropolitan areas was unchanged in October, while December consumer confidence improved slightly more than expected to hit a three-month high.

Resource shares got a boost from the weaker U.S. dollar <.DXY>, with Freeport-McMoRan Copper & Gold Inc gaining 1 percent to $82.61. Even so, with many market players out during the holiday week, action was muted and prone to choppiness.

If the broad S&P 500 ends the day higher, it would be the index's seventh straight positive session. Stocks have mostly inched up in recent days, as investors focus on 2010. The S&P 500 has shot up almost 25 percent for the year, but gained only 3 percent during the seven-day run.

The Nasdaq was flat as Apple Inc slipped 0.2 percent to $211.15 on profit taking after hitting recent highs. On the upside, Amazon.com Inc gained 0.6 percent to $140.10 after two brokerages raised their price targets on the stock.

The Dow Jones industrial average <.DJI> added 30.08 points, or 0.29 percent, to 10,577.16. The Standard & Poor's 500 Index <.SPX> edged up 1.92 points, or 0.17 percent, at 1,129.70. The Nasdaq Composite Index <.IXIC> was up 0.69 points, or 0.03 percent, at 2,291.77.

(Editing by Jeffrey Benkoe)