Yes, if you now sell your home you bought in October, 2016, and you have lived in this home since it was purchased, you qualify for the home sale exclusion from capital gains.
You must have resided in the home 2 of the last 5 years to qualify. You met this test in October, 2018.
Follow this link for more information: Home Sale Exclusion