As long as you follow the rules stated by the IRS and have already filed an extension, you can elect in TY18. Otherwise you will have to wait. In general late 475(f) elections are not allowed. See instructions under Mark-to-Market Election heading here.