What should you do if a company in your portfolio hits an all-time high?

Jim Cramer says that he thinks about this a lot. 

When it comes to investing education, Cramer says to think about it similar to the way that you'd think about gambling. 

Cramer said that when he was younger, he and his mother would go gambling together and that his mom would go with the intention of buying a cashmere sweater after. 

So, basically, keep a goal in mind when it comes to investing. 

"And then I think that you also have to recognize, you just want to play with the house's money that my recommendation for stocks that hit all-time highs is that you get the five to seven percent pullback and that's your chance, not the two to three [percent pullback]," Cramer continued.

Watch Jim Cramer's Daily NYSE Show and Replays Below