If securities in your portfolio got sold automatically it's because you were in violation of the account's margin requirements.
After an account's buying power goes below zero the swill send out a margin call email telling the user to sell some securities to bring buying power back into positive territory. If this does not happen, we will automatically liquidate a portion of the portfolio.
For more info on margin/margin calls, please see the following help files: