Their is no two ways that you can do without the risk in gambling. Gambling is always risky and you can only control the risk in gambling by gambling with the amount that you can afford to lose and another way you can also reduce the risk in gambling is just for to have a limit in gambling and don't try to exceed your limits in gambling.
Trading had it own risk but the risk in trading is much better than what we have in gambling. Risk in trading is always massive when people go into trading and not having the knowledge which is required to trade. Trading risk can be reduced by understanding it.
There are actually two ways to avoid risk in gambling. Only gamble with how much you can afford to lose, and set a limit for yourself in advance. Stop playing when you exceed the limit. Trading also has risks, but if you do it with knowledge, they can be largely controlled, whereas gambling is all about luck.
If you can control your gambling and trading, you can prevent yourself from severe losses. And those who cannot control themselves are the ones who suffer the most from risky gambling and trading.