The Dow Jones rose more than 60 points. It has now traded above its 2010 closing high of 11,205 four times over the past two weeks but failed to close above that level each time.
Small companies performed especially well. The Russell 2000, the index that tracks the performance of smaller corporations, jumped 2 percent to 712.89.
The index is up nearly 14 percent for the year, roughly double the return of the Dow and the broad Standard and Poor's 500 index.
Uncertainty over the effects of the midterm elections and the size of the Federal Reserve's expected stimulus program due today have kept the market from ending with either big gains or losses in recent days.
Eric Thorne, an investment adviser with Bryn Mawr Trust Wealth Management, said many traders have been using the end of the day to take short-term profits. With the economy still looking weak, there's no guarantee stocks will continue to climb.
An expected win for Republicans in the House could set up a scenario that leads to gridlock in Congress, meaning there could be a slowdown in new government spending and regulatory reform.
Traders are waiting for the Federal Reserve to wrap up a meeting where it is expected to announce plans to stimulate the economy. There is uncertainty about exactly how big a bond-buying program the Fed will announce, which also has tempered movements in stocks in recent days.
The Dow rose 64.10, or 0.6 percent, and closed at 11,188.72. It reached its closing high of 11,205.03 on April 26.
The broader Standard & Poor's 500 index rose 9.19, or 0.8 percent, to 1,193.57. The S&P 500, which is more closely watched than the Dow by professional investors, also is still below its 2010 high of 1,217.28, reached on April 23.
The Nasdaq composite index rose 28.68, or 1.1 percent, to 2,533.52.
.tweetbutton { margin-top: -3px; margin-right:-18px; }Real Estate Outlook: Small GainsMeager increase forecast for holiday retail sales