The best advice ever given investors in the stock market has always been: "Buy low, sell high!" Unfortunately, the problem has always been knowing when to sell more than even when to buy. But that is partly because people become mesmerized by numbers, especially if the number is getting larger over time. And some investors tend to forget that, until you sell it, your stock is only valued as a number on paper - not in cash in your hands. So, when should you ideally sell a stock?

When to Sell a Stock: 8 Time-Tested Tips

1. When Profit is Enough

If you are following the old market maxim, you know that the time to sell is when your stock has gained. But how much of a gain do you need to indicate time to sell? 

The main reason anyone has trouble selling a stock is not a question of timing, or even satisfactory profit. It is because of greed. 

How can anyone say that? Because most investors, even those claiming to be "disciplined," are almost always convinced if their stock has gained even to an amount they set as an objective limit, it will go higher if they just hang on. Or it will at the very least break even, if it is heading in the wrong direction. 

Stock analysts recommend you have a trading plan with every trade. That's because knowing when to get out of a stock is harder to determine than when to get into one. When a stock's price is heading in either direction fast, fear and greed usually motivate investors rather than rational planning or consideration of facts. 

2. Never, Ever Try to Time the Market

Never try to time the market. Almost all advisers agree, it is nearly impossible to tell when a market, or even an individual stock, has hit "bottom," just as it is difficult to predict when or if it will hit a "top." 

Therefore, you have to set parameters to help you make your own decision. Is the stock, through your investigation, worth what it costs right now? More or less than it costs now? And why? 

Say you buy a stock at $25 a share. You tell yourself you plan to sell it when its price hits $30 a share, or a 20% profit. The share price, through a quirk of the market, hits $32 instead. You told yourself you were going to sell it at $30, right? But you hold it hoping to see $35. It falls, never returning to $30. You grow frustrated, and sell it below $30, maybe even below your initial investment price of $25. Not only did you miss out on 20% profit by not selling it at $30, you now have to incur a loss.

3. Selling Is Only Wrong if It's a Result of Fear or Greed

Selling is only really a bad or wrong decision when it is the result of fear or greed, and not fundamental analysis of the value of a stock. According to some analysts, there are really only three reasons to sell a stock: when buying it in the first place wasn't decided on carefully, but was done based on a hunch, a tip, or some other subjective reason; when the price has risen dramatically, perhaps driven by speculators rather than by value-enhancing news or activity; and when you see no fundamental basis for the stock to be valued where it is - because it has risen rapidly to a silly, unsustainable price when considering its fundamentals. 

4. Focus on Valuations and Price

Investors should always focus on valuations and price. There are numerous metrics used for determining whether a stock's price is "fairly valued," including its earnings history, trading history, profit/loss history, or comparison to peers within its industry. If the share price at a given time exceeds the reason for buying the stock in the first place, sell at a profit and move on. 

5. Watch Your Dividends

If a company in which you've invested cuts its dividend, it is a signal. Dividends are paid out of earnings. If earnings fall, it can be difficult to make payouts to investors at the same amount as before. According to a few analysts, a cut in dividends indicates difficulties ahead.

6. Learn to Spot Long-Term Trading Patterns

Some investors rely on charts, or "technical trading" that looks at patterns in a stock's valuation or even an industry. Technical price charts can help some make decisions on whether to buy or sell. As stock prices can swing day-to-day, most advisers look at longer-term technical price charts to see how an investment is doing on a monthly, rather than daily, basis. A pattern, such as two months, of falling price closes, especially when prices close lower at the end of each month than beginning, could indicate a trend change. Combining that trend chart with how much volume there is in sellers versus buyers might also be an indication that large institutional investors are causing prices to fall by selling.

7. Consider Your Financial Needs

Financial needs, especially at tax time, could prompt an investor to sell. The investor has to determine whether, in a down year, a loss might benefit more than a gain. Capital gains are taxed, while losses can be used to offset other income.

8. If Your Investment Philosophy Changes

Sometimes, your overall investment philosophy changes. It can change because of your age, or your financial situation, or if you have other needs for your money such as retirement, moving, or to finance college. A simple change in asset allocation from growth to income or dividend-producing stocks might prompt a sale of a stock, as might a need for more liquid assets, such as to finance a college education.

Introducing TheStreet Courses:Financial titans Jim Cramer and Robert Powell are bringing their market savvy and investing strategies to you. Learn how to create tax-efficient income, avoid mistakes, reduce risk and more. With our courses, you will have the tools and knowledge needed to achieve your financial goals. Learn more about TheStreet Courses on investing and personal finance here.