v5.5: hourly heartbeat log line above all gates
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 <noreply@anthropic.com>
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
//+------------------------------------------------------------------+
|
||||
#property copyright "Copyright 2024, Garfield Heron"
|
||||
#property link "https://fetcherpay.com"
|
||||
#property version "5.4"
|
||||
#property version "5.5"
|
||||
|
||||
#include <Trade\Trade.mqh>
|
||||
#include <Trade\PositionInfo.mqh>
|
||||
|
||||
#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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user