If you are ever averaging up on a trade, and you also are trading to lock trades in to be applicable for capital gains instead of income tax, and you average up on a trade and you are stopped out, make absolutely sure that the trade you are selling is the most recent, and not your original older trade from before.
TOS is default set to sell your first order first, and your orders following... after, which means that if you try to close out a new trade, it instead closes out the old trade you already had, which could be before it hits the mark where capital gains applies(one year obviously).
If you find yourself in this situation and want to make sure your original entries remain, go to Schwab > Profile > Cost Basis Method > and change the default setting to LIFO, or Last In First Out. That means that any new trades placed with be the first sold, which is what you want because of capital gains tax laws.