Loading…

Strategy Telemetry Beacon

A recorder that writes a fresh dated file every day is the right shape for a journal, but the wrong shape for live monitoring - a dashboard watching for "is this strategy still alive" wants one stable filename it can tail continuously, not a new path to rediscover at midnight. This EA is standalone, which this catalogue's self-containment rule requires of every submission - it cannot reach into another EA's internal variables or include another project's code. What it reports is exactly what an external observer legitimately can see: account state, this chart's open positions filtered by an input magic number, and terminal/connection health signals. That is the same shape a real integration needs in practice, since a dashboard process is itself external to the strategy it is monitoring. The field to actually alert on is Heartbeat, a counter incremented on every write. A telemetry file whose heartbeat has stopped incrementing means the strategy stopped reporting - a distinct failure from any single field inside the file reading zero or stale, and the one a monitoring script should check first before looking at anything else in the file. HealthState folds connection status, price staleness and the trade-allowed flags into one label (OK / STALE / NO_CONNECTION / TRADE_DISABLED) so a quick glance answers "is something wrong" before drilling into the raw fields. Notes and limitations Reports only what is externally observable on this chart and account, not any strategy's internal decision state - it cannot know why a strategy is or is not trading, only whether the terminal is connected, whether trading is allowed, and what positions matching InpMagic currently exist. The file is REWRITTEN each cycle, not appended - it is a live status snapshot, not a history log. Pair it with one of this catalogue's journal-style recorders if a historical record is also wanted. Open-position figures reflect this chart's Symbol() only; a multi-symbol strategy needs one beacon instance per chart/symbol to get full coverage.

Expert advisor · MT4 · v1.0 · Free

About Strategy Telemetry Beacon

Strategy Telemetry Beacon is a script for MetaTrader 4. It has 4 settings, such as Strategy name, Magic and Update seconds. MQL source code included.

Files in the download: StrategyTelemetryBeacon.ex4, StrategyTelemetryBeacon.mq4, StrategyTelemetryBeacon.txt.

Settings

SettingDefaultWhat it does
Strategy nameMyStrategyLabel identifying the strategy this beacon reports on
Magic0Magic number to filter open positions by (0 = count all on this symbol)
Update seconds15How often to rewrite the telemetry file, seconds
Stale seconds120Seconds since the last tick before HealthState reports STALE

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Dashboards & Scanners · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria