"In the short run, the stock market is a voting machine, in the long run the stock market is a weighing machine."
"The market can remain irrational longer than you can remain solvent."
"Being early is a euphemism for being wrong."
These are the two most important insights into investing. Plenty of people see the writing on the wall, and anticipate the crash. Very few manage to profit from it. Most of the time the market goes up irrationally, in that stocks become progressively worse value for money.
The worst mistakes I've made have been the result of trading too soon on the basis of a correctly anticipated move.
Ways of avoiding this: use charts: do not sell into a rising market and use stop orders, to trigger sales in a falling market.