Stocks fell in volatile trading on Tuesday, failing to regain their footing after suffering steep losses in the previous session.

The Dow Jones Industrial Average fell 100.69 points to 25,286.49, while the dipped 0.2 percent to 2,722.18, posting its fourth straight decline. The Nasdaq Composite closed just along the flatline at 7,200.87. At their session highs, the Dow and S&P 500 were up more than 100 points and 1 percent, respectively. The Nasdaq had gained as much as 1.6 percent. The major indexes hit their session highs after White House economic advisor Larry Kudlow confirmed reports of renewed talks between the U.S. and China on trade.

Energy was the worst-performing sector as crude prices fell to their lowest levels in a year.

The stock market appeared to be moving at the whim of Apple, falling back into the red in the afternoon after Apple had moved lower.

Apple vs S&P 500 intraday

Source: Koyfin.com

Tuesday's moves come after the Dow dropped 602 points on Monday as Apple shares dropped on expectations of slowing iPhone sales. Apple's stock declined after Lumentum Holdings, one of its key suppliers, cut its outlook. Lumentum CEO Alan Lowe said in a statement one of its largest customers asked the company for a "material" reduction of shipments for its products.

This led to Goldman Sachs cutting its iPhone sales estimates and to J.P. Morgan downgrading Lumentum's stock.

Randy Frederick, vice president of trading and derivatives at the Schwab Center for Financial Research, said there may be more volatility ahead for tech. "I'm not convinced this tech skittishness is over. Normally, I wouldn't say one sector can drag the entire market lower, but tech is the biggest sector."

The S&P 500 technology sector closed 0.1 percent higher on Tuesday after rising more than 1 percent at its high of the day. Nvidia and Advanced Micro Devices were among the best-performing tech stocks, rising 5.2 percent and 3.1 percent, respectively.

Renewed trade talks between the U.S. and China helped lift sentiment in the stock market earlier on Tuesday.