Fix: make gridPlaced global so CheckWeekendProtection can access it

This commit is contained in:
2026-03-29 23:59:13 -04:00
parent 028a41b9b5
commit 24f3d09c96

View File

@@ -132,6 +132,9 @@ datetime lastEquityReset = 0;
bool weekendCloseExecuted = false;
datetime lastWeekendCheck = 0;
//--- Grid State
static bool gridPlaced = false;
//+------------------------------------------------------------------+
//| Check Daily Drawdown Protection |
//+------------------------------------------------------------------+
@@ -657,10 +660,9 @@ bool IsBreakout()
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
static datetime lastBarTime = 0;
static bool gridPlaced = false;
datetime currentBarTime = iTime(_Symbol, PERIOD_CURRENT, 0);
{
static datetime lastBarTime = 0;
datetime currentBarTime = iTime(_Symbol, PERIOD_CURRENT, 0);
MqlDateTime dt;
TimeToStruct(TimeCurrent(), dt);