Hands up anybody who went shopping for shares in the middle of January’s market rout. If your hand just shot up, you have my undying respect. Buying shares when everybody else is selling is one of the hardest things an investor can do, but ultimately one of the most rewarding.

Idiocy of crowds

We may like to believe that we’re all precious, beautiful individuals but the truth is we’re biologically primed to follow the herd. This makes sense from a survival point of view. People who take a stand against the crowd can get trampled. But it’s a disaster when it comes to investing, as you end up buying at the top of the market and selling at the bottom. Repeatedly.

It doesn’t matter how many times you read Warren Buffett’s famous maxim about being fearful when others are greedy and greedy when others are fearful, it’s very hard to put this principle into practice, as I have found. On 11 February, the FTSE 100 (INDEXFTSE:UKX) plunged to 5,537. My finger hovered over the buy button to top up my tracker, but I didn’t press it. Hysteria appeared to have gripped the markets and I decided there was worse to come, so I held back in the hope of picking up an even better bargain. I missed the moment. Within a couple of months, the FTSE 100 was up more than 15% to around 6,400.

Reasons to be fearful

The FTSE 100 is sliding again as fears grow over China, the slowing US economy, Brexit, and the failure of massive stimulus to revive the eurozone and Japan. Many now see the recovery of recent weeks as a false dawn and are urging investors to sell up ahead of another market slump.

Please, please, don’t sell. If you had sold in January and February, as many panicky investors did, you will have quickly regretted it as markets staged a surprise comeback. Also, you’ll have racked up trading charges and lost out on dividend payments, compounding your losses. You might even have doubled down by buying into the market at a higher price than you sold. Ordinary investors simply can’t afford to play the market this way.

Reasons to be greedy

What you need to do in troubled times is buy, although only if you can leave that money invested for at least five or 10 years, to give markets time to straighten up. If you can do that, you can take advantage of the FTSE 100’s slide to buy at a lower price, and net yourself a higher yield as a result. The index is currently yielding 4%, which is an especially juicy income stream with the Bank of England considering slashing interest rates below today’s 0.5%.

That yield makes now an attractive time to buy the FTSE 100, wherever the index goes next. Over the long term, dividends will make up around three-quarters of your total returns from stocks and shares, provided you re-invest them for growth, and today’s generous yield.

If you missed your moment in February, don’t make the same mistake this time round.

Picking up bargains when markets are falling is just one way to get rich from stocks and shares, but there are plenty of other strategies out there.

This FREE Motley Fool report, 10 Steps To Making A Million In The Market, sets out how investing in stocks and shares over the long term can make you rich.

You don't have to be a share picking genius, ordinary people can become astonishingly wealthy by investing in stocks and shares.

This no-obligation report shows you how to do it, step-by-step. To find out more, click here now.

Harvey Jones holds the HSBC FTSE 100 Index fund and iShares FTSE 100 ETF. The Motley Fool UK has no position in any of the shares mentioned. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.