Can i write off a $20k long term loss against a $20k long term gain from 2018?

has anything changed for 2018 which would affect this?