To get a sense of whether last year's rally is set to continue in 2018, Jim Cramer checked in with Bob Lang, founder of and technical analyst on's Trifecta Stocks newsletter, in Cramer's "Off the Charts" segment Tuesday night on Mad Money .

They started by looking at a chart of the S&P 500 for 2017, with Lang noting that for the first time ever, the index didn't have a losing month during the entire year. With that amount of momentum, Lang told Cramer it would be a mistake to start getting bearish.

The index's strength started to broaden out in the fourth quarter, with more stocks trading above their 50-day moving averages. The breadth signals that institutions are buying. Lang argues that investors should buy any dip in the S&P, which was a good strategy last year. There were only two pullbacks to the index's 20-week moving average last year, and both were buying opportunities, Cramer noted.

The Chaiken money flow oscillator for the S&P 500 has been positive for two-and-a-half years and continues to rise. Coupled withthe impact of tax cuts and relatively low interest rates, Lang thinks the S&P could be poised for another double digit gain in 2018.

Image placeholder title

The Dow Industrials chart also shows great strength in the Chaiken money flow oscillator. The relative strength index was overbought for nearly the entire year. Normally overbought equities are due for a pullback, but when the condition persists for a long time, it's called "embedded" and is a sign of significant strength. Volume trends are positive and money flow remains strong for the Dow Jones index. Lang suggests it would be pointless to try to pick a top, but says another 12% to 15% rally is possible this year. There's even a chance of a 20% gain that would take the index to 30,000.

Image placeholder title

TheStreet Recommends

Cramer and the AAP team are trimming Broadcom (AVGO) - Get Broadcom Inc. Report on strength. Find out what they're telling their investment club members and get in on the conversation with a free trial subscription to Action Alerts PLUS

Over on Real Money, Cramer says the breadth of advancers is a sign this bull market remains healthy. Get more on his insights with a free trial subscription to Real Money.

Search Jim Cramer's "Mad Money" trading recommendations using our exclusive "Mad Money" Stock Screener.

To read a full recap of this episode of "Mad Money," click here.

To watch replays of Cramer's video segments, visit the Mad Money page on CNBC.

To sign up for Jim Cramer's free Booyah! newsletter with all of his latest articles and videos please click here.

More of What's Trending on TheStreet:

At the time of publication, Cramer's Action Alerts PLUS had a position in AVGO.