Want to know the secret to making tons of money in the stock market? Consider this advice: "Be greedy when others are fearful and fearful when others are greedy."

Legend is that a young Columbia University student named Warren Buffett said these words to a handful of his classmates behind closed doors. This supposedly happened long before the Buffett Partnerships were created, and long before Berkshire Hathaway (NYSE: BRK-A) (NYSE: BRK-B) was even a twinkle in Buffett's eye.

Some 50 years later, Buffett has become the richest man on the planet, simply by adhering to those famous words.

But how do you keep that focus when markets are gyrating wildly? Here's another tip for successful investing: Use your imagination.

Imagine there's no market
Market noise distracts even the best investors. So to help you focus, pretend that the markets don't exist.

When investing in a company, you are investing in the assets and earnings power of the company. Shares of stock are just legal symbols of your ownership of part of the business.

Investors, unfortunately, are continuously bombarded with stock quotes that only unhinge their rational thought. Don't fall prey to Mr. Market's insane mood swings! If you sell because markets are declining and buy when euphoria is in the air, you are letting the market instruct you.

From your perspective, the markets should exist only when they give you opportunities to buy parts of businesses at bargain prices. At other times, it doesn't matter what the markets do.

Pretend you're the boss
Another profitable use for your imagination is to think as though you own the entire business.

It doesn't matter whether you buy 100 shares or 10,000 shares of stock. Imagine that your stock purchase gives you complete control of the company. If you can think this way, odds are very high that you will engage in the single most important investing activity: buying low and selling high.

Think about it. If you own a solid company and, along with everyone else in a pessimistic market, your stock price continues to decline, what are you going to do? Will you sell your business to the low bidder? I doubt it. Yet that is precisely what you are doing when you sell shares during panicky market environments. You are selling a sound business to the first low bidder who comes knocking on your door.

Unlike the stock investor, the business investor remains insulated from much of the irrationality that occurs during declining markets. Rather than be guided by emotion, this investor understands what the business is worth and prefers to sit still until the storm runs its course, and then receives more rational valuations. The business-oriented investor might buy more of a good thing at an even better price, assuring very favorable returns when calm skies return.

Arm yourself with knowledge
The good investor is the prepared investor. While declining markets are more likely to yield better bargain opportunities, they are also littered with land mines just waiting to decimate the value of your portfolio.

On its own, a declining stock price doesn't tell you much about the underlying business. Presumably, those who bought shares of Countrywide (NYSE: CFC) or Bear Stearns (NYSE: BSC) as they fell believed they were getting a bargain. Yet now, Countrywide shareholders are largely relying on the proposed buyout by Bank of America (NYSE: BAC). Similarly, as insulting as the $2 offer from JPMorgan Chase (NYSE: JPM) may seem, Bear Stearns shareholders may find that it's the only alternative to outcomes that would be far worse.

If you act as though you own an entire business, you'll probably avoid businesses you don't understand. That can have the positive effect of helping you stay out of money-losing businesses in challenging and complicated industries.

Instead, find companies with straightforward business models and strong balance sheets, and then wait to own them at attractive prices. When you do, you won't have to imagine the money you'll make.

More real-deal Foolishness: