A green VPS status and a quiet trade list answer different questions. To supervise a Forex EA, you need fresh evidence about the terminal, required market data, program operation and current broker orders — plus an alert route that still works when the reporting terminal stops.
This is Guide 4 in the VPS & MT4 Stability series. Start with hosting and continuity, use Guide 2 for configuration and Guide 3 for recovery. This guide focuses on observing normal operation and detecting uncertainty before an incident grows.
Define normal operation before defining a failure
An EA can be healthy without opening a trade. Its session filter, spread limit, existing basket, risk rule or lack of a valid signal may explain the silence. Monitoring should test whether the intended environment can perform its documented job, including managing existing orders, rather than demand a minimum number of trades.
Record the terminal identity, intended account/server, exact symbols and timeframes, EA version, approved Inputs, ownership rules and expected operating sessions. Include any other symbols the EA needs. Ask the developer what status, logs and restart behavior the program actually exposes. An EX4 file does not automatically provide a heartbeat or a complete explanation of every decision.
Keep three states distinct: normal, a confirmed problem and unknown. If a dashboard has stopped updating, show the last observation time and mark its current state unknown; do not continue displaying an old green status as current evidence.
Check four layers of evidence
| Layer | Useful observation | What it cannot establish alone |
|---|---|---|
| VPS and operating system | Availability, restart events, resource pressure, storage and the intended MT4 process. | A reachable machine or a running process does not prove responsive EA logic. |
| MT4 and market data | Correct account/server, connection and recent data for every required symbol. | One moving chart does not prove that a different required symbol is updating. |
| EA operation | Successful initialization, documented status, permissions and a meaningful heartbeat where supported. | A timer message does not prove that signal calculations or position management completed. |
| Broker orders and management | Current open/pending orders, accepted protection, request results and the intended management owner. | Balance, an old report or a last successful trade does not establish current protection. |
These are separate checks. They can be reviewed manually or collected by a deliberately configured monitoring system; MT4 does not automatically combine them into the dashboard described here.
A five-minute review without changing the strategy
- Confirm where the EA runs. Inspect the intended terminal and account, not a local chart left behind after migration.
- Check the session and required quotes. Establish whether updates are expected now and whether the exact broker symbols have usable data.
- Inspect initialization and permissions. Read recent
ExpertsandJournalmessages and the EA's documented status. - Inspect current orders. Verify who manages them and which protection actually exists at the broker.
- Check the monitoring path. Confirm the latest report time and that a test alert reaches the intended device.
Five minutes is a review format, not a guaranteed diagnosis or suitable response time for every EA. If something is unclear, preserve evidence and use the EA error guide. Do not loosen spread or risk limits, change Magic Numbers, or force an entry to make a status light turn green.
Connected is different from receiving fresh quotes
IsConnected() reports the terminal's connection to the server. It does not certify fresh data for every symbol, trading access or healthy strategy logic. Check the exact symbol names, including broker suffixes, and the data the EA requires beyond its attached chart.
MarketInfo(symbol, MODE_TIME) gives the last incoming tick time for that symbol in the broker's server-time basis. A last quote is historical evidence; it is not a clock that advances without new ticks. During weekends, symbol session breaks and quiet periods, an old quote can be expected. Check the broker's actual schedule before treating quote silence as a feed failure.
Define quote-age checks per symbol and session after observing normal behavior. There is no universal safe timeout for all Forex pairs or every EA. A flat Bid price alone is also insufficient: successive ticks can carry the same price. Where available, record data-event receipt rather than only a changed price.
Use the right clock for each question
| Clock or timestamp | Meaning | Monitoring limit |
|---|---|---|
TimeCurrent() | Last known server time. In OnTick(), it refers to the handled tick; in other handlers, to the latest quote for a selected Market Watch symbol. | It may stop advancing without quotes and is not specific proof of freshness for the EA's target symbol. |
MODE_TIME | Last incoming tick time for the specified symbol. | Use the correct server-time basis and session context. |
TimeLocal() | The computer's local clock. | Time-zone, daylight-saving or clock corrections can change comparisons. |
| Independent collector receipt time | When a monitoring service actually received an identified report. | It depends on the collector and transport; it does not prove the underlying trade workflow completed. |
Do not subtract broker quote time directly from a Windows clock and call the result quote age without establishing their common time basis. A developer can measure elapsed intervals with an appropriate counter, but must handle resets and counter rollover. An external collector should evaluate missing reports with its own tested elapsed-time logic, separately from market timestamps.
Timestamp logs with the source, date and time zone. Normalize sources before reconstructing an incident; a screen displaying two similar-looking times does not establish their order. See the Experts and Journal guide.
Decide what a heartbeat actually proves
A heartbeat is a periodic report from a named component. A VPS heartbeat says something about that host; a monitoring EA says something about its own event processing. Neither automatically proves that a separate trading EA has evaluated a signal or managed a basket.
OnTick() runs on new ticks for the EA's attached chart symbol. A heartbeat sent only there may go silent when that symbol has no ticks. A program can use EventSetTimer() with OnTimer() to request periodic events instead, if the developer implemented it. Timer events are queued; when one is already queued or being processed, another is not added. This is not a precise external clock or a guarantee that a blocked program will keep reporting.
Ask which checkpoint creates the report: entry into a handler, completion of data checks, completion of a management cycle, or successful transmission. Useful fields include instance identity, version, sequence number, operating mode, data status and report generation/receipt times. A growing sequence helps distinguish new reports from replayed ones; it still does not prove a fill.
With a closed-source EA, use supported vendor status and external observations. Do not describe an added observer as access to the strategy's internal health. A separate monitoring EA needs its own chart; attaching it to the strategy chart replaces the existing EA. It should observe without sending trades or managing the strategy's orders.
Watch for missing reports from outside the terminal
A terminal that has stopped cannot reliably send its own final outage message. An independent observer can detect that expected reports stopped arriving, provided the observer, its connection and its notification route still work. Keeping the only watchdog on the same VPS leaves it vulnerable to the same host failure.
Separate collection from intervention. A missing-report alarm means that observation failed somewhere in the sender, network, collector or alert path. It does not prove the primary EA stopped trading and must not automatically enable a spare trading copy. Investigate the host and current broker orders before the handover procedure in Guide 3.
Give every intended instance a distinct monitoring identity, and detect unknown or duplicate senders. Keep the collector itself observable with a tested fallback contact route. Transmit only necessary status; passwords, activation secrets and unrestricted account access are not heartbeat fields.
Monitor permissions without blindly enabling them
On ordinary desktop MT4, check both AutoTrading and the EA's own trading permission, plus the intended account's trading access and vendor license. A read-only login can display account information while preventing trading. A permissions change can leave an EA calculating while unable to make its intended order changes.
The no-argument IsTradeAllowed() checks the calling EA's permission and whether the trade context is busy. A false result is not a complete diagnosis; a true result is not a guarantee that the broker will accept the next request. A separate observer's permission result does not certify another EA's per-program permission.
Alert on an unexpected change from the approved operating mode. An intentionally paused terminal should be recorded as paused, not repaired by a watchdog. Turning automation off does not close positions; it may interrupt locally managed exits. Use an explicit management plan for any pause.
Monitor failed requests and existing positions
Follow the sequence of a documented trading request: intended action, attempt, returned result and reconciliation with broker records. Rejected requests and failed modifications matter even when no new position appears. If the vendor does not record attempts or reasons for skipped signals, that information cannot be reconstructed reliably from the trade list alone.
Error 128 means a trade timeout. After a lost or uncertain response, check open and pending orders and the relevant history before deciding whether to retry. No local confirmation does not prove rejection. Include exact symbol, direction, volume, ticket where known and request time in the investigation; avoid guessing which order belongs to the attempt.
Review current exposure, floating P/L, equity and accepted Stop Loss/Take Profit, together with the EA's documented ownership rules. Broker-held protection is different from a planned virtual stop or future trailing adjustment. A stopped EA can leave positions open, and a pending order can trigger while local monitoring is unavailable. This guide does not define a new drawdown threshold or automatic liquidation policy.
Test alerts all the way to the recipient
- In the intended terminal, open
Tools → Options → Notifications, enable push notifications and enter the intended mobile terminal'sMetaQuotes ID. - Use
Test, confirm the terminal result and verify receipt on the actual device. Check the device's notification permissions and the practical response route. - Test the EA or observer's real alert condition separately. A settings test does not prove that a missing-heartbeat rule or rejected-order alert exists.
- Record the test time, sender, destination and result; repeat after a VPS migration, device change or notification-setting change.
Notify of trade operations covers successful trade operations and documented account events; it does not notify about unsuccessful trading operations. It is therefore not a complete rejection, stale-data or terminal-outage monitor.
For custom SendNotification(), MetaQuotes documents a 255-character limit, at most 2 calls per second and 10 per minute. Violating frequency limits can disable the function. It does not work in the Strategy Tester, so delivery must be checked in a suitable running demo environment. A successful send result is not evidence that someone saw or acknowledged the message. Group repeated faults and send meaningful state changes instead of an alert on every tick.
Write an alert rule with context and a next step
| Condition | Context required | Useful next step |
|---|---|---|
| No recent report | Expected sender/interval, collector health and any planned maintenance. | Confirm the observation path and primary status; do not activate a spare automatically. |
| Old quote for a required symbol | Exact symbol, operating session, normal update behavior and clock basis. | Check other required symbols, connection and broker service status. |
| Unexpected trading restriction or failed request | Approved mode, calling EA/account, exact message and current orders. | Investigate permissions or rejection; reconcile uncertain execution before retrying. |
| Management status unknown with open orders | Current exposure, accepted broker protection and the intended managing instance. | Follow the documented incident plan and establish management responsibility. |
Define persistence, repeat spacing, acknowledgement and a recovery condition. A recovery message should say which observations resumed; one new heartbeat does not prove every layer recovered. Use an explicit maintenance window with a responsible person and an end time, rather than permanently suppressing a noisy alarm.
Choose severity by the actual account situation. The same data problem can matter differently with no exposure and with positions depending on local exits. Monitoring identifies that situation; it does not supply a universal safe waiting period.
A missing-heartbeat example with one clock
Hypothetical example: a collector expects one identified report every 60 seconds and raises a missing-report alert after 180 seconds without a new report. These are teaching settings, not recommended universal thresholds. All times below are collector observations in UTC; no broker quote time is subtracted from them.
| Collector time (UTC) | Observation | Conclusion supported |
|---|---|---|
| 10:00:00 | The last identified heartbeat is received. | One report arrived; its defined checkpoint was reported. |
| 10:01:00 | A separate host check responds; no new EA heartbeat arrives. | The host-check path works; EA reporting remains unconfirmed. |
| 10:03:00 | The collector has received no new heartbeat for 180 seconds. | The example's missing-report condition is met; the failed component is still unknown. |
| 10:03:20 | An authorized review sees updated quotes and an open broker order. | Market data and exposure are observed; the trading EA's management still needs verification. |
Here 180 ÷ 60 = 3 expected reporting intervals passed without a new receipt. This is not proof that trading stopped at 10:00:00, that the server rejected anything or that the order is unmanaged. Inspect the EA, its logs and current order state before intervention. If the collector itself was unavailable, it cannot claim to have observed the whole interval continuously.
Keep a small operating record
A practical record includes the latest successful review time, required-symbol data status, EA/terminal identity, open-order owner, unresolved messages, alert-test result and planned changes. Check after deployment, restart, migration, approved parameter changes and broker maintenance, then at a frequency matched to the management needs of the actual EA.
Public monitoring is useful for performance review, but first check its last update and reporting delay. An attractive balance curve is not a real-time health check. A quiet report or a flat balance cannot distinguish waiting for a signal from a terminal outage. Keep performance evaluation and immediate operational supervision as different jobs.
Observe the environment that actually trades
For a Windows VPS, host/process checks, terminal observations and an independent collector can cover different failure paths. Review resource pressure and startup behavior using Guide 2; a successful Windows login does not confirm a working EA.
For integrated MetaTrader virtual hosting, inspect the remote operating status, synchronization and requested terminal/Experts journals through its hosting controls. A local chart or local heartbeat is not a view into the remote EA. Any remote heartbeat must be deliberately deployed, compatible and tested in that environment; Windows services and unsupported DLL-based tools cannot simply be copied there.
Local AutoTrading does not stop the hosted copy. Use the hosting controls and verify the actual remote status for an intervention. A monitoring system should identify whether it observes the primary trading host, a local preparation terminal or a standby.
Rehearse the gaps in monitoring on demo
Use an authorized demo environment and its own state files. Test controlled terminal closure, loss of the reporting path, an expected symbol-session break, an intentional pause and return to normal operation. Distinguish a true alert from a successful alert-delivery test. Do not create an unmanaged live position just to test a watchdog.
Record the tested configuration, observations and remaining blind spots. Successful monitoring reduces uncertainty; it does not guarantee availability, order execution or strategy performance.
Common EA monitoring questions
Does no new trade mean the EA is broken?
No. Check the session, signal rules, data, permissions and existing-order management. A healthy strategy may correctly remain idle.
Does a heartbeat prove all EA functions are healthy?
No. It proves only the documented report was generated or received. Its value depends on where it is produced and which fields are fresh.
Can standard MT4 push notifications detect every failure?
No. Successful-trade notifications omit unsuccessful operations, and a stopped terminal cannot reliably report its own complete outage. Test custom rules and independent missing-report monitoring separately.
Should a missing heartbeat start a backup VPS automatically?
No. First establish the primary's trading status, current broker orders and management ownership. A missing report alone is not authorization for duplicate automation.
Official references and practical scope
Platform details were checked against official MetaQuotes documentation. The review format, example thresholds and incident rules are educational operating guidance, not a supplied monitoring product or measured reliability result. Interface labels vary by terminal language; confirm the labels in your own installation.
- MQL4: connection state and EA trading permission.
- MQL4: symbol quote timestamps, server-time behavior and timer event limits.
- MetaTrader 4: notification setup; MQL4: custom push limits.
- MetaTrader 4: remote hosting status and logs.