Me and my Wife moved back from US in Oct 2018.I was on H1b visa and my wife on H4. Can i file as a married non resident?

1) Stayed in US from Jan 1 2018 til 8th Oct 2018 with wife.

I was on h1b and wife on h4. Tax agent suggests that i can only file married filing separately.