Leverage is a hell of a drug.
Pretty much always make sure you're tracking it, with
As for the problem, looks like you're doing a ton of shorting. -shares means either you sell what you own, or you are willing to short. If you're not meaning to short, then maybe order_target instead. It just looks like you keep compounding that short over and over. You should have some sort of limit on that. Your buys would likely be the same story, you just are selling at the moment only.