Open positions and pending orders will remain in the system even after you exit the trading platform. All types of orders will be like this except for Trailing stops.Trailing stops will not be executed when you close or exit MetaTrader5, Expert advisors will not run when MetaTrader5 is closed or you have not logged in.