Major indexes swung between gains and losses as forecasts for first-quarter earnings have been scaled back.

"The economy is still moving in the right direction, just less speedily than we want to see," said Andrew Wilkinson, chief economic strategist at Miller Tabak & Co.