State tax filing

You are mixing up cap gains income on a Sch D  and ordinary expenses on the Sch C ... although they may offset each other in the long run on the form 1040 they do not directly impact each other on the same form.