You don't. Hacks target the exchanges wallet by finding exploits and not the user accounts separately. If you want your funds to be safe, use exchanges for trading only and withdraw to your personal wallet.
I will take your advice on using exchanges for trading and stored my coins in my personal wallet. Because it's much safer.