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 MetaTrader 5. Expert advisors will not run when MetaTrader 5 is closed, or you have not logged in.