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

Bank of America Rips on Earnings Beat, But Analysts See Even More Gains Ahead

Bank of America Rips on Earnings Beat, But Analysts See Even More Gains Ahead

3 Reasons Why Netflix Bulls Are Getting Their Face Ripped Off After Earnings

3 Reasons Why Netflix Bulls Are Getting Their Face Ripped Off After Earnings

Stocks End Mixed as Dow Rises, S&P 500 and Nasdaq Slip

Stocks End Mixed as Dow Rises, S&P 500 and Nasdaq Slip

Action Alerts Plus is Picking Raytheon Over Other Defense Names

Action Alerts Plus is Picking Raytheon Over Other Defense Names

Should Tesla Actually Fire Elon Musk?

Should Tesla Actually Fire Elon Musk?