From 342069ac989bb8b9f5443f4ea15805462787840f Mon Sep 17 00:00:00 2001 From: Garfield Date: Fri, 17 Jul 2026 00:42:40 -0400 Subject: [PATCH] v5.5: hourly heartbeat log line above all gates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ea-watchdog inferred tick starvation from expert-log silence, but a stable placed grid is also silent — it restart-looped the container 11 times on Jul 15-16. The heartbeat fires on any tick once per hour before every gate (weekend block, stand-down, drawdown), so silence >1h during market hours now unambiguously means a dead chart feed. Co-Authored-By: Claude Fable 5 --- OrdersEA_Smart_Grid_BO.mq5 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/OrdersEA_Smart_Grid_BO.mq5 b/OrdersEA_Smart_Grid_BO.mq5 index 12d372c..c4cc9b4 100755 --- a/OrdersEA_Smart_Grid_BO.mq5 +++ b/OrdersEA_Smart_Grid_BO.mq5 @@ -5,12 +5,12 @@ //+------------------------------------------------------------------+ #property copyright "Copyright 2024, Garfield Heron" #property link "https://fetcherpay.com" -#property version "5.4" +#property version "5.5" #include #include -#define VERSION "Version 5.4 Smart Grid Breakout BO MT5" +#define VERSION "Version 5.5 Smart Grid Breakout BO MT5" #define MAX_TRADES 600 #define MAX_LOG_TRADES 1200 @@ -1320,6 +1320,18 @@ void OnTick() return; } + // --- Hourly heartbeat (5.5) — ABOVE every gate on purpose: it fires on + // any tick, so log silence >1h during market hours means the chart feed + // is dead (tick starvation), never a blocked/quiet EA. The ea-watchdog + // keys off this; without it, a stable placed grid looks identical to a + // starved chart and the watchdog restart-loops (seen Jul 15-16). + static datetime lastHeartbeat = 0; + if(TimeCurrent() - lastHeartbeat >= 3600) + { + PrintS("hb " + DoubleToString(SymbolInfoDouble(_Symbol, SYMBOL_BID), _Digits)); + lastHeartbeat = TimeCurrent(); + } + // --- Per-EA daily drawdown (3.1B) --- if(!CheckDailyDrawdown()) {