You can't fund an HSA for any months in which you had Medicare insurance.
So, since I cancelled today, I can fund 9 months for2019?
If you are enrolled in an employer HDHP plan through active employment of you or your wife and have disenrolled from Medicare effective April 1, you can fund the HSA up to 75% of the annual amount.
You are not allowed to enroll in an Obamacare plan if you are eligible for Medicare.
If you are enrolled in Medicare in 2018, you cannot contribute to a HSA even if you had a HDHP and "Medicare is an unused backup".
Please read this document:
https://www.benstrat.com/downloads/HSA-GPS_HSAs-and-Medicare.pdf