Loco is correct.
Keep enough cash on hand for your emergency fund.
If you stay out of the overall market you'll lose.
But you have to weather the coming storm and not panic and sell. So you need staying power.
A market crash has been predicted for quite a few years. If you'd stayed in cash after 2008 you'd have missed the huge rise over the past decade.
Expect a crash. Mentally prepare for it so you don't panic and sell out. It's going to feel lousy when it hits and you watch your portfolio drop by 50-70%.
If you hang in, the market will come back. Make take a few years. All that while you should keep buying more.
However, if you are heavily invested only in a few particular stocks or sectors, there is no assurance they will come back. Those companies might go down the tubes for good, especially if they are grossly over-valued before the crash.