I discovered a small bug in my software where a trade marked as "pending close" wasn't really closed if the next day's priced moved too much against me. In this case a trade would not be closed at all, totally ignoring any profit/loss it has.
After fixing, some systems had to be removed, hence a...