Rates from Bankrate.com

NEW YORK (TheStreet) -- U.S. stocks dipped Tuesday as the S&P 500 again failed to close beyond its 50-day moving average, and oil rose higher following the resignation of Egypt's foreign minister amid widening and sometimes violent protests calling for President Mohamed Morsi's departure.

The S&P reversed course at mid-day after the index hit 1,624.26, just above its average level over the past 50 days, according to Bespoke Investment Group. The market gauge fell 0.1% to close at 1,614.04 after it was unable to move past its 50-day average.

U.S. stocks have been volatile for more than five weeks as mixed signals from Federal Reserve officials about the size and duration of the central bank's stimulus program dampened investor sentiment despite encouraging signs of growth in the world's largest economy. The S&P 500 has failed to break past its 50-day moving average for three times in four days.

Crude oil for August delivery settled at $99.60, a gain of 1.6%, the highest price since May 2012, as clashes throughout Egypt intensified pressure on the country's military to force President Morsi to leave office.

Elsewhere, Federal Reserve Bank of New York President William C. Dudley, in a speech in Stamford, Conn., said that despite weak economic conditions such as 7.5% unemployment and slow GDP growth, he expects the economy to make gains in 2014. Dudley, who has championed the Fed's stimulus program, said he is confident slowing rates of inflation paired with firming markets will spur growth.

"The private sector of the economy should continue to heal, while the amount of fiscal drag will begin to subside," Dudley said.

Investor sentiment was further strengthened earlier when automakers reported a double-digit increase in pickup truck sales, a sign of a reviving economy and improvement in the home construction market.

Although stocks finished the first half of 2013 up by double-digits, Russ Koesterich, Blackrock's chief investment strategist, said in a client note published Monday that stocks still have more room to run in the second half as valuations remain attractive.

"For the remainder of the year we continue to emphasize large and mega-cap U.S. stocks and we would suggest a focus on select cyclical sectors, namely energy and technology," Koesterich wrote.

Automaker Ford jumped 2.8% to close at $16.18 after reporting that its June U.S. sales increased 13% from a year ago resulting in the company's best June sales since 2006. U.S. auto sales to be reported throughout the day were generally expected to show a rise 6% to 8% according to TrueCar.com. Ford said that during the month, it experienced strong retail share gains and attracted many new customers.