Know when to hold 'em and when to fold 'em

Cash not always king: Cramer
Cash not always king: Cramer   

Believe it or not, some of the best advice that Jim Cramer ever received was from Kenny Rogers. That is, of course, referring to his lyrics from "The Gambler," suggesting that an investor needs to know when to hold 'em, when to fold 'em and when to walk away.

So, after spending a significant amount of time researching his trades from the past, Cramer has devised a set of rules to know when to call it quits.

His first suggestion is not to fall under the illusion that most companies are sitting on piles of cash. If a company has a lot of cash, that does not matter. Cramer thinks what matters most is the way that the company puts the cash to work.

"When it comes to picking a stock, cash is not always king. In fact, if you buy a stock just because it's sitting on a mountain of cash, you could get crushed," the "Mad Money" host said.

Matteo Battagliarin | iStock | Getty Images

Skeptical? Cramer said look no further than Cisco and Oracle. According to published reports, in 2013, Cisco had as much as $9 per share in cash while Oracle had well over $8 per share.

"People were lulled into buying their stocks simply because they had so much cash on their books," Cramer said.

Another runaway red flag for a stock is when a company blames its customers for its own poor performance.

Cramer saw it first hand when he owned Juniper in 2011. The maker of networking and communications equipment began to fall when the stock was in the low $40s. It had the audacity to blame lack of orders from Japanese customers for its own poor performance.

When the company pointed the finger, the stock quickly dropped to the $30s, based on worries for more missed orders.

"I stuck with Juniper because the company had a ton of cash—oops—it was pretty clear that Europe had a lot of problems, and I ascribed the domestic weakness to the fact that the U.S. government had been a big Juniper customer," Cramer added.

----------------------------------------------------------
Read more from Mad Money with Jim Cramer
Cramer: How to pick a stock
Cramer: Stocks that signal a raging buy
Cramer: Effective pro trading technique
----------------------------------------------------------

The "Mad Money" host learned this lesson the hard way; he stuck with it as the stock got crushed at $20. He finally figured out that the blame-the-customer excuse was lame, as Cisco was taking market share the whole time and simply kicking Juniper's butt.

In the end, knowing when to hang on and when to walk away could save investors a lot of headaches and money. When a company is sitting on a mountain of cash and doing nothing, or when it blames customers for its own mistake, it is time to smell a rat and walk away.

Questions for Cramer?
Call Cramer: 1-800-743-CNBC

Want to take a deep dive into Cramer's world? Hit him up!
Mad Money Twitter - Jim Cramer Twitter - Facebook - Instagram - Vine

Questions, comments, suggestions for the "Mad Money" website? madcap@cnbc.com

Cramer's New Book