Hi again:
Here is, with some examples (scroll the chart to the left), how the strategy works and how you can avoid crashes and even small downturns in the market.
On top (dark yellow line) the S&P500, 1D timeframe. The chart below is the XLP/SPX using two moving averages: blue line is the 1 EMA and the pink line a 155 EMA.
When the XLP/SPX crosses up the 155 EMA line, it's time to sell the S&P 500 (basically, almost all your stocks, because nowadays almost all move in synchrony) and vice versa.
Of course, there are multiple strategies you can use and even in a downtrend you can sell only some of your stocks, even buy in very small amounts shares or fractional shares (DCA). You can also adjust the parameters changing the timeframe and the EMA for swing trade or for long-term investing.
That's it. Good luck, patience and don't forget, make it simple.