Launch pricing: VRD Complete $149 while we gather our first reviews. See the price steps

Articles · Virtual Risk Desk · Published 2026-10-26 · Updated 2026-11-23

EA Kill Switch for MT5: Stop the EA, Then Close Its Trades

Short answer: An EA kill switch in MT5 stops an EA and, if you choose, flattens it. The Algo Trading button (Ctrl+E) stops every EA but leaves positions open. Remove the EA from its chart to stop just one, then delete its pending orders and close its positions by magic number. A rules-based drawdown limit can do the same when you're away.

Key takeaways

  • Stopping an EA and closing its trades are two different steps.
  • The Algo Trading button stops all EAs; removing an EA stops one.
  • Rules-based limits act faster than you can, but can't guarantee a fill.
  • Write the plan down while you're calm.

What a kill switch is for

Sooner or later an EA does something you didn't expect: a grid that keeps adding, a bug after an update, a strategy that's simply out of its depth. The question isn't whether you'll need to stop one, it's how fast and how cleanly you can do it.

A kill switch has two parts: 1. Stop new risk: the EA can't open more trades. 2. Remove existing risk (optional): delete its pending orders and close its positions.

People often do the first and assume they've done the second.

Manual kill switches in MT5

1. The Algo Trading button (Ctrl+E). The toolbar button turns automated trading off for the whole terminal. Every EA stops sending orders. Fast, blunt, and it does not close anything. Open positions and pending orders stay live on the broker's server, and any stop-loss or take-profit already set still applies.

2. Remove one EA. Right-click the chart, choose Expert list (or the EA's menu) and Remove. Only that EA stops. Use this when one EA is misbehaving and the others are fine. Again, its trades stay open.

3. Close and delete by hand. In the Trade tab, close positions and delete pending orders. If several EAs trade the same symbol, check the magic number or comment so you only close the right EA's trades. This is where unique magic numbers matter. Group operations → Close all positions (it appears when One Click Trading is enabled under Tools → Options → Trade) closes every position on the account, including manual trades, and a running EA can open new ones straight after.

The usual order: stop the EA first, delete its pending orders, then close its positions. Otherwise the EA may open new trades as you close the old ones.

Control Stops new EA trades Closes positions
Algo Trading off (Ctrl+E) Yes, every EA in the terminal No
Remove the EA from its chart Yes, that EA only No
Close or delete in the Trade tab No; stop the EA first Only the ones you pick
Group operations → Close all No; a running EA can reopen Yes, every position, including manual trades

Manual switches have one big weakness: they need you, awake, at a screen, noticing the problem. On a VPS that's monitored properly, you'll notice sooner, but you still have to act.

Rules-based kill switches

A rules-based switch decides in advance: "if this EA loses this much, do this." It acts at 3am the same way it acts at 3pm. The key design choices are:

  • What's measured: whole account, or each EA on its own?
  • Against what: starting balance, a peak, or a fixed capital amount per EA?
  • What happens: alert only, stop new orders, or close positions?
  • Reset: does the limit reset daily, or not?

How VRD Guardian does it

Virtual Risk Desk's VRD Guardian is a per-EA, rules-based approach. Specifically, in v1.10:

  • Per EA, by magic number. Each EA's drawdown is measured against its own operating capital: realised net plus floating, divided by operating capital. It's not measured from a peak, and there is no daily reset.
  • Three bands, defaults 20%, 26% and 32% of operating capital: warn, intervene and abandon.
  • Warn raises an alert. Alerts fire once each time a band worsens.
  • Intervene deletes that EA's pending orders.
  • Abandon deletes pending orders and closes that EA's positions, only if auto-close is turned on. It's off by default, so out of the box the abandon level does not close trades.
  • One close attempt. Each position gets a single close call with no retries, so check the result if a close fails during a fast market.
  • Managed magics. You choose which magic numbers it manages (empty means all). Symbols with trading disabled are skipped.
  • Freezes survive a restart. They're stored per account in terminal global variables.

It also shows lot use against your max lots (warn at 80%, intervene at 100%) and a margin-level alert below 120%. It doesn't offer prop-firm presets, a trailing high-water mode, or warnings on drawdown speed or distance to stop-out. And it needs Algo Trading on to act: if you've switched Algo Trading off, no EA, Guardian included, can send orders. The reverse catches people out too: an update or a profile load can switch Algo Trading off without you noticing. The Terminal Health manual explains how its Algo Trading check tells a button switched off by accident from one that was off all along.

If you need a prop-firm style daily limit, read our prop-firm daily drawdown guide, and use the firm's own rules as your hard limit.

VRD Complete combines Insight, Guardian and Quant, plus editable EA Passports and calibrate-and-save sizing. So it includes Guardian's bands, and you can edit each EA's operating capital and max lots on the chart.

Choosing your limits

Base each EA's operating capital and bands on evidence, not hope. Start from its backtest worst drawdown at your real lot size (reading MT5 backtest drawdown) and allow for live being worse (Monte Carlo drawdown). If you already have a deposit, pick the lot from that same drawdown figure. Grid and martingale EAs need special care, because their floating loss can grow quickly (grid and martingale EA risk).

Write the plan down

Keep a one-page kill-switch plan next to your terminal list. Save the EA's inputs, magic number included, as a dated set file so you can restore the same setup after a restart or a chart reload: - [ ] Which EA, which magic number, which account. - [ ] Its operating capital and its bands. - [ ] Whether auto-close is on, and why. - [ ] Who acts manually, and how (exact steps). - [ ] How you'll check that closes actually happened.

Start by seeing each EA clearly. The free VRD Insight tracker splits results and closed-trade drawdown by magic number, so you know which EA is the problem before you pull a switch.

See which EA is the problem, for free.

Download VRD Insight on the MQL5 Market and attach it to any chart. It splits results and closed-trade drawdown by magic number, so you know which EA to stop before you pull a switch. No website, no sign-up, no time limit.

Download VRD Insight free on MQL5 How Insight works

Go further

The How to Build an AI Trading Desk playbook includes capital-desk rules for sizing, drawdown and margin, plus escalation steps for when an alert fires.

Free: The MT5 Sunday Restart Runbook

Two full chapters and two checklists, 7 pages.

Get the free runbook

Risk disclaimer: Trading forex and CFDs with leverage carries a high risk of loss, and you can lose more than you expect. No kill switch can guarantee to limit losses: gaps, slippage, disconnections and broker rejections can stop rules executing or fills occurring at expected prices. Nothing here is financial advice.

Frequently asked questions

What is an EA kill switch?

A way to stop an expert advisor trading, and optionally close its positions, quickly. It can be manual, such as turning off Algo Trading, or rules-based, such as a drawdown limit that acts automatically.

Does turning off Algo Trading close my trades?

No. It stops EAs sending new orders, but open positions and pending orders stay on the broker's server. You still need to close or delete them yourself if you want to be flat.

How do I stop just one EA in MT5?

Remove it from its chart (right-click the chart, Expert list, Remove) or disable it in its properties. The Algo Trading button stops every EA in the terminal at once.

Can a kill switch guarantee I won't lose more?

No. Gaps, slippage, disconnections and broker rejections can all stop a close from happening at the price you expected. A kill switch limits damage; it can't promise a level.

Does VRD Guardian have a daily loss limit?

No. Guardian measures each EA's drawdown against that EA's operating capital, with no daily reset. It isn't a prop-firm daily-limit tool.

Should I turn off Algo Trading before I close the trades?

If a rules-based switch or an EA will send the close orders, leave Algo Trading on until those closes have filled, then turn it off if you want. Turning it off first blocks every EA, including the one trying to close. For a purely manual flatten, stop the EA first, then close by hand.

Does Close all positions in the Trade tab stop the EA?

No. Group operations → Close all positions (it appears when One Click Trading is enabled under Tools → Options → Trade) closes every position on the account, including manual trades, but a running EA can open new ones. Stop the EA first, or it may replace what you just closed.

What if the market is closed when I use a kill switch?

New entries can stop at once, but close requests on forex pairs fail until the market reopens. The fill may then gap from Friday's close. Check that the closes actually happened when trading resumes.

One EA blowup costs more than the whole suite.

VRD Complete contains single-EA blowups and frees capital you have parked as idle buffers. $149 at launch pricing.

Get VRD Complete on MQL5How it works
Trading forex and CFDs carries a high risk and you can lose some or all of your capital. VRD tools are risk management and analysis software. They do not eliminate risk, guarantee profits, or guarantee that any account will be protected or recovered. Actions may execute late or not at all in fast markets, gaps or connection loss. Backtests and simulations are hypothetical. Past performance is not indicative of future results.
VRD Complete $149 launch priceGet it on MQL5