Image: Money lesson © Dave Bradley Photography, Riser, Getty Images

Although I write primarily about trading, I've also interviewed and learned from hundreds of longer-term investors. Successful traders and investors often have similar goals: manage risk, diversify and learn to control emotions. The main differences are the tools they use and how long they hold a position.

Here are a few notable investors I've interviewed over the years, and what I learned from them:

John Bogle: When I interviewed Vanguard Group founder John Bogle for my first book, his most useful advice was "stay the course." He told me that people are the most optimistic when the market is at an all-time high, and most pessimistic when it's at an all-time low.

"Time is your friend, impulse is your enemy," Bogle said. Bogle is a huge proponent of diversification; he also advised holding stocks in an amount that lets you sleep at night. "Sell down to the sleeping point," he said.

William O'Neil: He explained how to manage risk. When first entering a position, he often buys half of a normal position, and adds a little to it if the stock goes up. O'Neil's most useful advice to me: Make bigger money when you're right, and cut losses when you're wrong. O'Neil, a veteran trader and founder of newspaper Investor's Business Daily, also stresses that you do not always need to be in the market. Knowing when to lock in gains and move to the sidelines is just as important as knowing how to capture gains in the first place.

Peter Lynch: I learned from Peter Lynch that if you understand what you own, and what the company does, you won't panic if the market or your stock goes down. The former Fidelity Magellan Fund (FMAGX)manager doesn't panic during bear markets, and takes them in stride.

John Templeton: In 1998, while doing research for a book, many sources spoke highly of legendary stock investor Sir John Templeton. So I picked up the phone and spoke to his secretary, who gave me his number in the Bahamas.

I was surprised when Sir John answered the phone. I spoke with him for 15 minutes and asked if he'd agree to a longer interview. He politely declined.

The lesson I learned: First, do your research. Second, be prepared for anything. Unfortunately, I learned this on my own, because I don't remember one thing Sir John told me about the stock market. I wasn't recording the conversation, and I didn't take notes. Why? Because I didn't fully appreciate to whom I was speaking. Calling Sir John was similar to speaking with Warren Buffett on his private line.

Now, before I do any interviews, I do my research, and I am prepared for any possibility. I have applied these same lessons to investing or trading in the stock market. I don't invest or trade in a stock, bond, or option unless I've done my homework.

10 important lessons

Even though I've learned many lessons about the stock market, some of the best advice came from my grandfather, the president of a successful stock brokerage. He wrote the following to my father:

  1. Begin by paying off all your debts.
  2. After being debt-free, you must not be tempted to blow your money on risky financial adventures.
  3. It is hard enough for most people to earn a bare living, including 95% who are unable to keep and acquire a fortune. This is not to discourage you but to warn you and give you courage to fight harder to be one of the 5%.
  4. Always be prepared for the possibility that you may have to support your parents. In addition, you owe it to your spouse and your family to buy life insurance.
  5. You want the privilege of helping those who are afflicted and impoverished.
  6. The most important measure of success is integrity, hard work and being right more than 55% of the time. This also means diversifying risks so that when you are wrong it won't break or crimp you.
  7. Never co-sign promissory notes to help others.
  8. Never buy stocks in small corporations to please friends -- easy to buy, hard to sell.
  9. Don't be easy in loaning money except in extreme cases (i.e. don't let down a worthy friend).
  10. Only hard experience, proven by fact, should impress you and cause you to follow the rules just outlined.

In addition to this common-sense advice, I also learned that the simplest strategies are often the most successful. Buffett famously said that he doesn't invest in anything he doesn't understand. Stick to strategies you know and understand.

Most important, be aware of your emotions. If you're too bearish, you'll miss out on profitable investing opportunities. And if you're too bullish, you'll be unprepared for worst-case scenarios. Getting too emotional about the market may cloud your judgment and damage your portfolio.

Whether you're an investor or trader, it's important to create target prices for buying, selling and emergencies. Stop-losses can be mental or manual, but know in advance when to get in or out.

Finally, it's a personal choice whether to use technical, fundamental or sentiment analysis. But no matter how you analyze the market, get out of a stock when you're wrong, and stay in when you're right. That's easier said than done, but it's essential for stock market survival.

Click here to become a fan of MSN Money on Facebook

More from MarketWatch: