Rest assured, your open positions and pending orders will persist on the platform even if you go offline or close the Trading Platform. Upon your return, they'll seamlessly reappear when you log back in.
All order types will remain active except for trailing stops, which stop working when you're offline or log out of MT5. Similarly, Expert Advisors (EAs) also become inactive when you log out or go offline.