No, you cannot avoid risks in trading, it is based on taking risks to obtain higher profits. But you can avoid certain risks in trading by using reliable brokers.
For example, I trade with FP Markets to avoid being scammed since they have regulation from ASIC and their trading conditions are robust.