Connecting an MT5 expert advisor to an external monitor takes one include file, one function call on a timer and one line in the terminal options. This guide walks through the five steps with the actual code from the Quantisentry EA kit, and lists the errors you are most likely to hit on the way.

What gets sent, and what never does

The EA posts a small JSON payload over HTTPS to a single ingest route. It describes the state of one strategy on one account: which account and magic number, the symbol, the strategy family, versions, the lot chain (base, requested, final and the multiplier applied) and whether trading is currently allowed. The channel is one-way. There is no route that returns a command, and the platform answers 403 to anything that would alter trading state.

What is never sent: your broker password, investor password or any credential that could open a position. The only secret involved is the installation key that identifies your tenant.

Step 1 — Allow the URL in the terminal

MT5 blocks every WebRequest to hosts that are not explicitly allowed. Open Tools → Options → Expert Advisors, tick Allow WebRequest for listed URL and add:

https://api.quantisentry.com

Skip this and every call fails with error 4014 in the Experts tab. It is the cause of nine out of ten "nothing shows up in the dashboard" tickets.

Step 2 — Copy the include

From File → Open Data Folder, place SentinelTelemetryV1Client.mqh in MQL5/Include. If you just want to see an account appear before touching your own code, also copy SentinelTelemetryV1_ExampleEA.mq5 to MQL5/Experts, compile it with F7 and attach it to any chart. The example never trades; it only reports.

Step 3 — Send from OnTimer

In your own EA, include the client and start a timer. Thirty seconds is the default interval.

#include <SentinelTelemetryV1Client.mqh>

input string InpTelemetryUrl = "https://api.quantisentry.com/api/ea-telemetry/v1/ingest";
input string InpTelemetryKey = "";      // installation key from your welcome email
input int    InpIntervalSec  = 30;

int OnInit()  { EventSetTimer(InpIntervalSec); return(INIT_SUCCEEDED); }
void OnDeinit(const int reason) { EventKillTimer(); }

void OnTimer()
{
   string accountKey = AccountInfoString(ACCOUNT_SERVER) + "::" +
                       IntegerToString((int)AccountInfoInteger(ACCOUNT_LOGIN));

   SentinelTelemetryV1_Send(
      InpTelemetryUrl, InpTelemetryKey,
      MagicNumber, _Symbol, "breakout",
      "1.0.0", "1.0.0",            // telemetryVersion, guardVersion
      baseLot, requestedLot, finalLot, appliedMultiplier,
      allowTrading,
      accountKey, AccountInfoString(ACCOUNT_SERVER),
      AccountInfoInteger(ACCOUNT_LOGIN), "My strategy");
}

Use the timer, not OnTick. Ticks stop at the weekend and in thin hours, and a heartbeat that depends on ticks cannot tell a closed market from a dead EA.

Step 4 — Fill the lot chain honestly

The four lot fields are what make the data useful later. Base lot is what the strategy would trade with no adjustment. Requested lot is what it asked the broker for after its own risk logic. Final lot is what was actually executed after volume-step rounding and margin limits. Applied multiplier is the factor between base and requested. When final and expected differ by more than 5%, the platform flags the row. If your EA does not track these yet, send zeros and 1.0; the account will still appear, with the audit marked as not evaluable.

Step 5 — Verify

The Experts tab should print a line every interval:

[SentinelTelemetryV1] sent OK (account=YourBroker::12345678)

The account appears in the dashboard within a minute, keyed as server::login. Stop the EA and watch the row change to stale after five minutes: that transition is the feature you are installing.

Errors you will actually see

Common integration errors
SymptomCauseFix
WebRequest failed, error 4014URL not in the allowed listStep 1. The entry must be the scheme and host only.
HTTP 401 / 403Empty or wrong installation keyPaste the key again; check for trailing spaces.
HTTP 400 with a reasonPayload failed contract validation (missing required field, negative lot, timestamp in the future)Read the reason text; fix the field. Check the VPS clock.
Works on one chart, not on anotherTwo EAs sharing one magic number on the same accountGive each strategy its own magic; the identity is account + magic.
Nothing in the Experts tabAlgo Trading off, or the timer never startedEnable Algo Trading; confirm EventSetTimer runs in OnInit.

Keep the key out of your source

Pass the installation key as an input, never as a string literal in a file you commit or share. If you distribute a compiled EA to clients, each client uses their own key. A leaked key lets someone post fake telemetry into your tenant; it does not let anyone trade, but it is still your evidence trail.

Frequently asked questions

Why does WebRequest fail with error 4014?

The URL is not in the terminal's allowed list. Add https://api.quantisentry.com under Tools, Options, Expert Advisors, Allow WebRequest, then try again.

Does the telemetry EA place or close trades?

No. It only posts a JSON payload describing state. The platform is observation-only and has no route that sends commands back to the terminal.

How often should the EA send telemetry?

Every 30 seconds by default, from OnTimer. The platform treats more than five minutes without a report as stale.

Do I have to share my broker password?

No. The only credential involved is your installation key. Broker and investor passwords are never requested or transmitted.