How to run an MT5 Expert Advisor 24/7 without your PC
Updated 2026-11-25 · HostMT5 guides
An Expert Advisor only trades while the MetaTrader 5 terminal it is attached to is running and connected. Close the terminal, let the PC sleep, or lose your home internet, and the EA stops. The fix is to run the terminal somewhere that never switches off. This guide shows the quickest way: a hosted MT5 terminal you open in your browser.
.ex5, attach it to a chart, and close the tab. The EA keeps trading on HostMT5's servers, a watchdog restarts the terminal if it ever stops answering, and you get an email or Telegram alert when something needs you.Why an EA stops when your PC does
MT5 runs the EA inside the terminal process. Every tick the broker sends triggers the EA's OnTick(); no terminal means no ticks and no orders. Common reasons EAs stop overnight:
- Windows updates restart the PC.
- Sleep or hibernate settings, or a laptop lid being closed.
- Home internet or power cuts.
- The terminal was closed, or AutoTrading (Algo Trading) was switched off.
Any of these silently stops your strategy, often while it holds open positions.
Three ways to keep an MT5 EA running 24/7
| Option | What you manage | Fits when |
|---|---|---|
| Leave your own PC on | Power, updates, internet, sleep settings | Testing only |
| Windows VPS (Remote Desktop) | A Windows server: install MT5, update Windows, reconnect after reboots | You need full Windows, other software or many terminals you configure by hand |
| Hosted MT5 terminal (HostMT5) | Nothing on the server side: you use MT5 in a browser | You want EAs running 24/7 with no server to look after |
See MT5 VPS options compared for the full comparison, including MetaQuotes' own Virtual Hosting.
Step by step: run your EA 24/7 on HostMT5
- Create an account. Sign up with email or Google. HostMT5 is currently free and needs no card.
- Add your MT5 account. Type your MT5 login, password and server name exactly as in desktop MT5 (for example
YourBroker-Live). Any broker that offers MetaTrader 5 works, demo or live. - Upload the EA. Upload the compiled
.ex5file from your computer; the source code is not needed. If you have the.mq5source, you can upload that instead and it is compiled on the server, with any compile errors shown. (The MetaEditor editor itself is not available in the hosted terminal.) - Attach it. Pick the symbol and timeframe, set the EA's inputs and attach it. You can run up to 10 EAs per account, each on its own chart with its own inputs.
- Check AutoTrading. Make sure Algo Trading is on in the terminal, then close the tab. The EA keeps running.
What keeps it running
Auto-restart watchdog
HostMT5 checks every hosted terminal every 30 seconds. If a terminal stops answering for about 90 seconds it is restarted, logs back in to your broker and reattaches every EA with its inputs. After a server restart the same happens on its own.
Alerts by email and Telegram
You get an alert when:
- the terminal stops answering (and again when it is back);
- prices stop arriving for 5 minutes while the forex market is open (the broker connection is lost);
- AutoTrading is switched off, so EAs cannot trade;
- your own limits are crossed: equity drawdown % from balance, or margin level %.
Alerts go by email and/or to your own Telegram bot. Each fires once when the problem starts and once when it clears, so you are not spammed.
Statistics
Each account gets statistics built from its MT5 deal history: net profit, win rate, profit factor, expectancy, maximum drawdown, best and worst trade, long/short split, results per symbol and per month, and the balance curve. Handy for checking that an EA behaves live the way it did in the tester.
Tips before you go live
- Run the EA on a demo account first and compare its trades with the Strategy Tester.
- If the EA reads files or external data, test that on the hosted account too.
- Use the drawdown alert as a safety net for runaway losses.
- Want the same strategy on several accounts? Run the EA once and copy its trades to your other accounts.
- Want TradingView strategies instead of an EA? See TradingView alerts to MT5.
FAQ
Will my EA keep running if I close the browser?
Yes on a hosted terminal. On HostMT5 the browser only displays MT5; the terminal and its EAs run on the server and keep trading after you close the tab or switch off your PC.
What happens if the terminal crashes?
HostMT5 checks every terminal every 30 seconds. One that stops answering for about 90 seconds is restarted, logs back in and reattaches its EAs, and you get an email or Telegram alert.
Do I need the EA source code?
No. Upload the compiled .ex5 file. If you have the .mq5 source you can upload that instead and it is compiled on the server. The MetaEditor editor itself is not available.
How many EAs can run on one account?
Up to 10 EAs per MT5 account on HostMT5, each on its own chart with its own inputs.
Real MetaTrader 5 in any browser. EAs 24/7, copy trading, TradingView webhooks. No card needed.
Start free →- A free MT5 VPS alternative: hosted MetaTrader 5, free during launch
- Do you still need an MT5 VPS?
- TradingView alerts to MT5 orders with a webhook
- Copy trades between MT5 accounts at different brokers
- A MetaApi alternative for traders, not only developers
- A free PineConnector alternative with MT5 hosting included
- The full MT5 terminal in your browser
- Let an AI assistant work with your MT5 account
- Use MT5 from Python on Mac, Linux or a notebook
- A REST API and live stream for MetaTrader 5
- Let Claude or ChatGPT build and run your MT5 EA
- Download years of MT5 price history to CSV
- Moving Skynet MT5 alerts to HostMT5