Here's the process, and how it applies to your situation.
1. Total all ST gains and losses including carryforward. +710 in your case. Schedule D line 7.
2. Total all LT gains and losses including carryforward. -17000 + 2600 - 20000 = -34400 in your case. Schedule D line 15.
3. Net ST and LT together: -33,690 in your case. Schedule D line 16.
4. Since you have a loss, you can take $3000 of your $33,690 loss against ordinary income and carryforward the remainder to the next year. Schedule D line 21.
(Because the excess loss is from LT losses, you'll probably have a $30,690 LTCL carryforward. See the carryforward worksheet.)