If you sell stocks and mutual funds at a profit, you have taxable capital gains.
There is no way to reduce your tax liability either at the federal or state levels.
The down payment for your house is not tax deductible. Only any mortgage interest and property taxes you paid on the new house in 2018 are deductible as itemized deductions.