I was thinking what my top five rules for investing might be, but there have been so many good ones from so many great investors over the years it’s very hard to select the best. So here, instead, are just five rules that I think everyone should follow (and next time you ask me I might pick a completely different five).

Rule 1: Never lose money

This might sound obvious, but it’s Warren Buffett’s rule number 1 (and his rule number 2 is, famously, “Never forget rule 1“).

Most people who start out investing in shares are focused on how much they can possibly gain. They look at past successes and want some of it, and they go seeking the shares they think will have the biggest upsides. But the shares with the best growth potential are usually also the riskiest, and if you get the wrong ones then you could be exposed to some nasty downside too.

If you’re investing your hard-earned cash, your first focus should be on how to preserve it — and the companies that are best at preserving cash, strangely enough, usually turn out to be the best at growing it too.

Rule 2: Keep Your Costs Down

If you invest £1,000 in shares it’s likely to cost you around £15 in broker charges and stamp duty, then you’d have to pay around another £10 to sell. The spread between the buying and selling price has to be considered too, and that can vary a lot — a FTSE 100 company will have a very small spread, but smaller AIM shares can carry spreads of 10% or more.

In all, you could easily be looking at a 5% hit for every buy/sell cycle, and that will quickly kill any profits if you trade too often — so don’t over-trade, and keep the costs down.

Rule 3: Don’t try to time the market

Do you watch share price charts and try to guess where the price is going next and try to get in at the low point? Does it upset you if a share falls after you’ve bought it or rises after you’ve sold it? You’re making a big mistake.

Trying to time the market is a mug’s game, and none of the investment greats place any store in it — if it was easy to do then they’d certainly be doing it.

Rule 4: Invest on fundamentals alone

This is the flip side of Rule 3 really, and says that the only thing that counts when making an investment decision is a company’s fundamentals. Is it in a safe business? Does it have a good track record? Is it growing its profits? Does it pay healthy dividends supported by strong earnings?

If you can buy shares that satisfy these criteria and can get them at a favourable share price valuation, you’ll almost certainly beat the chart-watchers.

Rule 5: Investing is forever

This is one of the best rules of all. When you look at a share, don’t buy it for a quick profit, don’t buy if you think you might sell after a year. In fact, don’t buy with any time horizon at all — buy with a view of holding forever.

Of course, fundamentals can turn bad and selling might become a good idea, and this rule doesn’t mean you should actually never sell — just only buy shares that, at the time, look good enough to keep for ever.

If you want some ideas of shares to buy and hold for ever, get yourself a copy of this exclusive Motley Fool report and it'll have you on your way in no time. Every share described is one that should see you right over decades to come.

The 5 Shares To Retire On report covers some pretty solid sectors, including Pharmaceuticals, Utilities and Retail essentials, and it identifies some shares that firmly satisfy my Rule 4, above.

What's more, the report is completely free, so click here today to get your copy while it's still available.

Alan Oscroft has no position in any shares mentioned. The Motley Fool UK owns shares of and has recommended Apple. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.