Risk warning: trading gold carries a high risk of loss. Gold Position Manager is software: it works only while MetaTrader 5 runs on your PC or VPS, and it can stop. Always be ready to manage your trades yourself. Risk disclosure

Home/Learn/EAs and a computer that is off

Do MT5 Expert Advisors work when your computer is off?

No. An Expert Advisor is a program inside MetaTrader 5 on your computer. When the computer sleeps, shuts down or loses its connection, the EA stops. Only orders already held by your broker keep working, such as each trade's stop loss and take profit. To trade while you are away, keep the PC awake or run MT5 on a VPS.

Key points

  • Stop loss, take profit and pending orders are stored at your broker and work even when your PC is off.
  • Everything an EA does itself (partial closes, break-even moves, trailing, alerts) stops while MT5 is not running.
  • Trades you open on your phone are managed only if an EA is running on a PC or VPS for the same account.
  • A VPS is a rented Windows computer that is always on; it is the usual solution.

Why an EA stops when your PC stops

MetaTrader 5 has two parts: your terminal (the program on your PC) and your broker's trade server. An Expert Advisor lives in the terminal. It watches prices and sends orders to the server. When the terminal is closed, frozen or offline, or the PC is asleep, the EA simply does not run. No program can work inside a sleeping computer.

What keeps working, and what stops

WhatStored wherePC asleep, off or offline
Stop loss of a tradeBroker serverkeeps working
Take profit of a tradeBroker serverkeeps working
Pending orders (limit, stop)Broker serverkeep working
Partial closes at several levelsEA in your terminalstop
Moving the stop to break-evenEA in your terminalstops
MT5's built-in trailing stopYour terminalstops
Alerts to your phone from the EAEA in your terminalnot sent

Even orders at the broker are not guaranteed prices: in fast markets and gaps a stop can be filled at a worse price.

What about trading from your phone?

The MetaTrader 5 phone app can open, change and close trades, and receive alerts, but it cannot run Expert Advisors. A trade you open on your phone is still managed by your EA, as long as MT5 with that EA is running on a PC or VPS logged in to the same account. Think of the phone as a remote control and the PC or VPS as the engine.

Option 1: keep your Windows PC awake

  1. Start → Settings → System → Power & battery (Windows 10: Power & sleep) and set sleep when plugged in to Never. The screen may still turn off; that does not stop MT5.
  2. On a laptop: keep it plugged in and set what closing the lid does to Do nothing (type "lid" in the Windows search box).
  3. Set Windows Update → Advanced options → Active hours, so updates do not restart the PC while you trade.
  4. Keep a stable internet connection and power. A power cut or router restart stops the EA too.

Option 2: run MT5 on a VPS

A Virtual Private Server is a Windows computer in a data centre that runs 24 hours a day. You connect to it with Remote Desktop, install MT5 and your EA there, and log in to your trading account. What to look for:

  • Windows (MT5 desktop needs it) with at least 2 GB of memory for one or two terminals.
  • A data centre close to your broker's server for low delay; MT5 shows the ping in the bottom-right corner.
  • Reliable uptime and support. Prices usually start at a few dollars a month.

MetaTrader also offers its own built-in hosting service. Check with your EA's maker whether all of its functions work there.

Run the EA in one place only

If the same EA runs on your PC and on a VPS for the same account, both may act on the same trade, for example closing the same partial twice. Run it on the VPS, and use the PC and phone only to watch.

What happens when the PC comes back

A well-built EA continues from where it stopped: it reloads what it already did on each trade and catches up with the current price. It cannot undo what happened while it was off: a level the price touched and left again in the meantime is not taken afterwards. Check your trades whenever your PC was asleep.

How Gold Position Manager handles this

Gold Position Manager places each trade's stop loss at your broker, and it can also give the last take-profit step to the broker, so both work even while your PC is off. Every step is saved before each close, so after a restart it continues where it left off and never takes the same step twice. If your PC was asleep while a trade was open, it tells you on the panel and can send an alert to your phone. It is honest about the limit: take-profit steps and break-even need MT5 running, so for trading away from your desk we recommend a VPS. Where it runs.

Questions

Do MT5 Expert Advisors work when the computer is off?

No. The EA runs in the MT5 terminal on your computer and stops with it. Only orders already at the broker, such as stop loss, take profit and pending orders, keep working.

Does my stop loss still work if I close MT5?

Yes. A stop loss that is already set on a trade is held by your broker and works when MT5 is closed. It can still be filled at a worse price in fast markets or gaps.

Do I need a VPS to use an EA?

Not if your PC stays on and connected while you trade. If you want the EA to work while your PC is off, or you trade mostly from your phone, a VPS is the usual solution.

Sources

Risk note

This guide is education, not financial advice. Computers, internet connections, VPS providers and brokers can all fail; always be ready to manage your trades yourself. Trading gold carries a high risk of loss.