1. Why MqlCalendarValue Fails Silently in Production

In local demo terminals, MqlCalendarValue appears populated. When deployed onto stripped prop-firm servers or headless Linux/Wine containers, calendar synchronization is frequently disabled or delayed—returning 0 events with no compile error.

2. Why TimeCurrent() Freezes Around Rollovers

Caching calendar polls with TimeCurrent() relies on incoming broker quote ticks and shifts with broker server DST. Using TimeGMT() keeps cache TTLs and heartbeat staleness checks exact across every venue.

3. Zero-JSON-Library Parsing via ?compact=1

Heavy third-party MQL5 JSON AST parsers bloat EA memory and choke on nested arrays. Appending ?compact=1 returns a flat ~250-byte object designed specifically for fast native StringFind checks.

Self-Contained MQL5 WebRequest Gate (Replaces MqlCalendarValue)
input string FNR_ApiKey = ""; // Optional for EURUSD ($0 free); fnr_live_... unlocks all 18 pairs

bool FNR_CheckCompactGate(string brokerSymbol) {
   if(MQLInfoInteger(MQL_TESTER)) return true; // Strategy Tester bypass
   static string lastSym = "";
   static datetime lastPollGmt = 0;
   static bool cachedSafe = false;
   if(brokerSymbol == lastSym && (TimeGMT() - lastPollGmt) < 15) return cachedSafe;

   string url = "https://forexnewsradar.com/api/v1/pairs/" + brokerSymbol + "?compact=1";
   string hdr = "Accept: application/json\r\n";
   if(StringLen(FNR_ApiKey) > 10) hdr += "Authorization: Bearer " + FNR_ApiKey + "\r\n";

   char post[], result[];
   string resHeaders;
   int code = WebRequest("GET", url, hdr, 5000, post, result, resHeaders);
   lastSym = brokerSymbol;
   lastPollGmt = TimeGMT();
   if(code != 200) { cachedSafe = false; return false; } // Fail-closed on 402/offline

   string json = CharArrayToString(result);
   cachedSafe = (StringFind(json, "\"stale\":false") >= 0 &&
                 StringFind(json, "\"prop_safe_to_trade\":true") >= 0);
   return cachedSafe;
}
VIDEO FIELD GUIDE #19 0:47 · 1080p HD

Fix MQL5 Suffix Bugs (XAUUSD.pro) With 250B ?compact=1 JSON

Shows how automatic broker ticker normalization (.pro, m, _ecn) and the tiny 250-byte ?compact=1 JSON endpoint keep MQL5 WebRequest loops fast and bug-free.

QUANT DESK FIELD NOTE · Broker Symbol Heterogeneity & Low-Footprint Edge Parsing in MQL5

Execution venues rarely standardize instrument identifiers: Spot Gold trades as XAUUSD, XAUUSDm, XAUUSD.pro, XAUUSD_ecn, or XAU/USD across retail and institutional bridges. Exact-string lookup tables inside custom EAs fail silently when users deploy bots onto a new broker feed, throwing unknown-symbol errors or skipping news protection entirely. Server-side prefix and suffix normalization inside /api/v1/pairs/{SYMBOL} resolves messy broker strings to canonical feeds cleanly, while ?compact=1 trims payload weight down to roughly 250 flat JSON bytes so MQL5 StringFind checks parse in microseconds.

Related MT5, Prop-Firm & MCP Engineering Playbooks

Inspect Live Macro & VETO Feeds by Instrument