You did it wrong. The ideal is to withdraw the investment and not the profit. That way you eliminate the risk.

If you want to make more profit, just hold and sell in the medium/long term.