I live in USA from 2015 until July 1, 2017. I moved to Canada in JUly 2017.
My questions are:

(1) which forms 1040 or 1040NR to file in 2017? I am filing jointly with no children.
(2). I sold my property in June 2017 and loss 130000. How to cllaim and which form to file?