In the stock market and in life, risk is unavoidable. The best anyone can do is to manage risk through sensible planning.
The only way to control risk when investing in stocks is through how much we buy and sell, when we buy and sell, and how we prepare for as many potential events as possible.
As stock market investor, you must learn to sell for your own protection because you have no control over the forces that move stock prices.
Your goal is not risk avoidance but risk management: to mitigate risk and have a significant degree of control over the possibility and amount of loss.