The S&P 500  index has been in a protracted uptrend in recent months but recently has been consolidating (moving sideways) after a nice run higher. U.S. stock markets continue to rise on optimism about the new Trump presidency, but indices must clear recent all-time highs in order to continue pushing higher.

The S&P 500 is facing resistance at the all-time high area around 2277.00, and the index must clear that area to continue the uptrend. Prices consolidated last week for the third straight week, but as long as the S&P 500 remains above key support at 2227.00 and 2170.00, the bulls will remain strongly in control and the multiyear uptrend will continue.

Investors might want to wait for the index to make a breakout above those all-time highs and close higher before looking for another long entry point. They could also wait for a more substantial pullback into the 2227.00 support handle and look to get long there. Either way, this market is strongly biased to the upside and buying the dips remains the strategy of choice.

The Dow Jones Industrial Average index is in a similar situation as the S&P 500: A multimonth uptrend has given way to recent consolidation/sideways movement at levels just below the all-time highs. We will wait to see what develops for now, but our strategy of choice is looking to be a buyer on a price action signal.

Follow Nial Fuller on Twitter.

This article is commentary by an independent contributor, separate from TheStreet's regular news coverage.

More from Stocks

Walmart's New Secret Sauce? A Sense of Urgency, Says This Data Analytics CEO

Walmart's New Secret Sauce? A Sense of Urgency, Says This Data Analytics CEO

Tesla Ramps Up Model 3 Production While Everyone Is Distracted

Tesla Ramps Up Model 3 Production While Everyone Is Distracted

Dow Powers Higher as Walmart Surges, U.S. and China to Resume Trade Talks

Dow Powers Higher as Walmart Surges, U.S. and China to Resume Trade Talks

Stanley Black & Decker CEO: Taking Craftsman From Sad Shape to Made in America

Stanley Black & Decker CEO: Taking Craftsman From Sad Shape to Made in America

Jim Cramer Breaks Down the Dramatic Changes Happening at Walmart

Jim Cramer Breaks Down the Dramatic Changes Happening at Walmart