Fix: make gridPlaced global so CheckWeekendProtection can access it
This commit is contained in:
@@ -132,6 +132,9 @@ datetime lastEquityReset = 0;
|
|||||||
bool weekendCloseExecuted = false;
|
bool weekendCloseExecuted = false;
|
||||||
datetime lastWeekendCheck = 0;
|
datetime lastWeekendCheck = 0;
|
||||||
|
|
||||||
|
//--- Grid State
|
||||||
|
static bool gridPlaced = false;
|
||||||
|
|
||||||
//+------------------------------------------------------------------+
|
//+------------------------------------------------------------------+
|
||||||
//| Check Daily Drawdown Protection |
|
//| Check Daily Drawdown Protection |
|
||||||
//+------------------------------------------------------------------+
|
//+------------------------------------------------------------------+
|
||||||
@@ -659,7 +662,6 @@ bool IsBreakout()
|
|||||||
void OnTick()
|
void OnTick()
|
||||||
{
|
{
|
||||||
static datetime lastBarTime = 0;
|
static datetime lastBarTime = 0;
|
||||||
static bool gridPlaced = false;
|
|
||||||
datetime currentBarTime = iTime(_Symbol, PERIOD_CURRENT, 0);
|
datetime currentBarTime = iTime(_Symbol, PERIOD_CURRENT, 0);
|
||||||
MqlDateTime dt;
|
MqlDateTime dt;
|
||||||
TimeToStruct(TimeCurrent(), dt);
|
TimeToStruct(TimeCurrent(), dt);
|
||||||
|
|||||||
Reference in New Issue
Block a user