drawguard.io logodrawguard.io
GuidesLive demo
Guides

How to get an alert when an MT5 EA stops working

Updated Oct 27, 2026 · 4 min read

Short answer: an alert that runs inside your MT5 terminal can't tell you the terminal is dead. If the VPS reboots, the terminal crashes or the connection drops, the code that would send the message stops with it. To be told, you need a check that runs somewhere else and raises the alarm when the terminal's regular signal goes missing. A missing signal is also the only dependable way to catch an EA that is running but has quietly stopped doing its job.

This guide covers the ways an EA goes quiet, what MT5's own notifications can and can't do, the heartbeat pattern traders use, and where an outside check fits.

Why EAs go quiet without telling you

Traders on the MQL5 forum describe the same case again and again. In one thread, an EA stopped trading for three days while the VPS was up and the terminal showed as connected. The owner found out by looking at the account.

There are two different failures, and they need different checks:

  • The terminal is gone. The VPS restarted, the terminal crashed, or the broker connection dropped. Nothing on that machine can report it.
  • The terminal is fine but the EA is stuck. It was removed from the chart, hit an error, or stopped evaluating signals. The terminal still looks healthy.

What MT5's own notifications can do

MT5 can push a message to your phone. SendNotification sends to the MetaQuotes IDs you entered in the terminal's Notifications tab. The limits are in the docs:

  • No more than 2 calls per second and 10 calls per minute.
  • Messages up to 255 characters.
  • It doesn't work in the Strategy Tester, and notifications must be enabled in the terminal (TERMINAL_NOTIFICATIONS_ENABLED).

That is enough to send "order failed" from inside your own EA. It cannot send "I am dead", because a dead EA runs no code. The same is true of email sent from the terminal with SendMail, which needs the SMTP settings in the terminal (TERMINAL_EMAIL_ENABLED).

TERMINAL_CONNECTED is the documented flag for the connection to the trade server. An EA can read it, but a check like that also runs only while the terminal is alive.

The heartbeat pattern

The most common advice in the forum thread is a heartbeat: the EA records the time it last finished a signal evaluation, for example in a global variable (GlobalVariableSet), and a second program checks whether that timestamp is recent. Contributors point out two good habits:

  • Alert on a stale timestamp, not on "no trades". A quiet market means no trades; a healthy EA still updates its heartbeat.
  • Check that the EA's open positions still exist, so a stuck EA is separate from a normal one.

The weak point is where the watcher lives. A watchdog EA on the same terminal dies with the terminal. A heartbeat is only useful if the thing that reads it sits outside the machine that can fail.

Where an outside check fits

DrawGuard is a monitor that works from outside the terminal. A free EA on one chart sends the account's equity and every open position to a web dashboard every 60 seconds. Paid plans email you when the EA stops sending data, per account, for example after a VPS restart, a broker disconnect or a crash.

See it on a live demo portfolio

Three simulated prop accounts in DrawGuard. Drawdown broken down by symbol, magic number and comment. No sign-up needed.

Open the demo →

What that does and doesn't cover:

FailureDoes the outside check notice?
VPS restart or crashYes: the data stops, so you get the email
Terminal closed or broker disconnectYes, for the same reason
The DrawGuard EA removed from its chartYes: it stops sending
Another EA on the account stuck while the terminal is fineNot by itself. Data keeps arriving, so no connectivity alert fires

That last row matters. DrawGuard's connectivity alert watches the data feed, not each EA's decisions. If one of your trading EAs stalls while the terminal runs, no connectivity email fires. The free plan has no connectivity alerts; they are on paid plans. DrawGuard never restarts anything or closes trades. It monitors and warns.

What to set up

  1. Add a heartbeat to EAs you can edit, and alert on staleness, not on missing trades.
  2. Run one check outside the terminal so a dead VPS gets reported by someone other than the VPS.
  3. Use a hedging account and a unique magic number per EA, so you can see which EA's positions went quiet. Here is how to see the drawdown per magic number.
  4. Decide what happens next. An alert only tells you. If you also want positions closed at a loss limit, read about equity protector EAs.

FAQ

Can an MT5 EA alert me when it crashes?

No. A crashed EA or terminal runs no code, so it can't send a message. The alert has to come from a check outside the terminal that notices the signal has stopped.

Does MT5 have a built-in alert for a disconnected terminal?

Not one that works while the terminal is down. SendNotification and SendMail run inside the terminal, and TERMINAL_CONNECTED can only be read by running code.

How often can an EA send push notifications?

The MQL5 documentation allows no more than 2 calls per second and 10 per minute, with messages up to 255 characters.

Will DrawGuard tell me if one of my EAs stops trading?

Not directly. Its connectivity alert fires when the DrawGuard EA stops sending data, such as after a VPS restart or broker disconnect. It does not watch whether each of your other EAs is still making decisions.

See your own drawdown per EA, live

Attach the DrawGuard EA to one chart and every strategy on the account is tracked from then on: equity, drawdown, and which magic number caused it. One account is free forever.

Explore the live demo →Start free

More guides

  • Equity protector EA for MT5: what it does, where it fails, and what to pair it with

    An equity protector EA closes your positions at a loss limit. What it can and can't do, how it compares to a prop firm's hard stop, and where a monitor fits.

  • How to measure combined drawdown when several EAs share one MT5 account

    Each EA's backtest drawdown tells you little about the account's real risk. How to measure combined drawdown from live equity, and see which EA caused each dip.

  • How to see drawdown per EA (by magic number) in MT5

    MT5 shows each trade's magic number but never the drawdown per EA. What MT5, Myfxbook and FX Blue can and can't show, and how to see each EA's real floating drawdown.

drawguard.io provides trading risk analytics for informational purposes only — not financial advice, not trading signals. Past performance does not guarantee future results.

Guides·Privacy Policy·Terms of Service·Refund Policy·Risk Disclaimer·Contact

© 2026 TRADEINTEL (Pty) Ltd · drawguard.io · Reg. 2026/445160/07