If you are talking about federal income taxes, they are never deductible. If you paid state income taxes for 2014 when you filed your return in 2015, the additional taxes you paid with your return become deductible when you file your 2015 federal income tax return (assuming you itemize deductions).
Sales on which losses are disallowed because you recover your market position within a 61-day period.