Why MT4 Stops When You Close RDP, and How to Fix It

A common story: you close Remote Desktop, come back later, and MetaTrader is gone or your EA has stopped trading. It is easy to conclude that closing RDP stops MT4. The truth is more specific, and once you know which of the actions below you took, the problem is usually simple to prevent.
Disconnecting and signing out are not the same
On a Windows VPS, these two look similar and behave very differently:
- Disconnect (the X on the Remote Desktop window): your session keeps running on the server with MetaTrader open. The EA carries on.
- Sign out / Log off (from the Start menu): the session ends and Windows closes every program in it, MetaTrader included.
So the first rule is to leave with the X, and never sign out. If you only ever disconnected and the terminal still vanished, one of the causes below is more likely.
Other reasons the terminal disappears
Session limits
Windows can be set to end disconnected or idle sessions after a time limit, through Group Policy or the user's Remote Desktop settings. If a disconnected session is ended, its programs close with it. Check the limits under Local Group Policy: Computer Configuration, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, Session Time Limits.
A login under another account
If you connect with a different Windows account, you get that account's own desktop, with no MetaTrader on it. The terminal may still be running in the other session, or Windows may have been asked to end that session to make room.
Windows updates and reboots
An automatic restart closes everything, and it often looks like an RDP problem because you only notice it the next time you connect. Check the event log (Event Viewer, Windows Logs, System) for the restart time. To bring the terminal back automatically, see how to auto-restart MT4 and MT5 after a VPS reboot.
Out of memory
A small VPS running several terminals can run short of memory, and programs can crash as a result. Task Manager's Performance tab shows how close you are.
When the terminal is open but the EA is not trading
Sometimes MetaTrader is there and only the EA has stopped. Look at these, in order:
- The AutoTrading button on the toolbar is on.
- The EA's name in the top-right corner of the chart shows it as active (a smiling face in MT4).
- The connection indicator at the bottom right shows live traffic, not "No connection".
- The Experts and Journal tabs at the bottom show why the EA stopped or which order was rejected.
A checklist for a Windows VPS
- Leave with the X; do not sign out.
- Set the disconnected-session limit to Never.
- Control when updates restart the server, and pick a time when the market is closed.
- Use one account for MetaTrader, and do not share it.
- Set up automatic start so a reboot does not leave you offline.
- Check in from your phone now and then, because Windows will not tell you when something stopped.
Keeping terminals independent of your session
All of these causes come from the same place: MetaTrader lives inside a desktop session that you have to look after. On our MetaTrader VPS, terminals run on the server independently of any connection. Close the screen, lose your internet or connect from another device, and no terminal closes or restarts. You manage accounts and EAs from a web panel, so most days you do not need a remote desktop at all, and Telegram tells you if a terminal crashes, loses its broker connection or an EA reports an error.
If you need a full Windows machine, the checklist above will get you most of the way. If you only need the EA to keep running, see the plans.
Frequently asked questions
Can I close Remote Desktop while my EA is running?
Yes. On a Windows VPS, disconnect with the X rather than signing out, and make sure no session time limit is set.
Does turning off my own computer stop the EA?
No. The EA runs on the VPS, so your computer can be off, as long as the session on the server stays alive.
Do I lose my open trades if MetaTrader closes?
No. Positions stay on the broker's server with their stop-loss and take-profit. What stops is whatever the EA itself was managing until the terminal is running again.
Trading carries a high risk of loss. This article is about keeping software running and is not trading or investment advice.



