Rename HIGH/LOW to InpHigh/InpLow to avoid MQL5 constant conflict

This commit is contained in:
2026-03-29 22:28:14 -04:00
parent 16b69d251c
commit 3971dbd2b3

View File

@@ -22,8 +22,8 @@ input int MagicNum= 333;
//--- Smart Grid Settings
input string GridSettings = "=== Smart Grid Settings ===";
input bool UseAutoPivots = true;
input double HIGH= 0;
input double LOW= 0;
input double InpHigh= 0; // Manual HIGH level (0 = use AutoPivots)
input double InpLow= 0; // Manual LOW level (0 = use AutoPivots)
input double Entry= 10;
input double TP= 15;
input double Lots=0.01;
@@ -205,17 +205,17 @@ void CalculatePivotPoints()
if(UseATRFilter && atr > 0)
{
HIGH = NormalizeDouble(PivotP + (atr * ATRMultiplier), _Digits);
LOW = NormalizeDouble(PivotP - (atr * ATRMultiplier), _Digits);
InpHigh = NormalizeDouble(PivotP + (atr * ATRMultiplier), _Digits);
InpLow = NormalizeDouble(PivotP - (atr * ATRMultiplier), _Digits);
}
else
{
// Use standard pivot levels
HIGH = PivotR1;
LOW = PivotS1;
InpHigh = PivotR1;
InpLow = PivotS1;
}
Print("AutoPivots Set: HIGH=", HIGH, " LOW=", LOW, " ATR=", atr);
Print("AutoPivots Set: HIGH=", InpHigh, " LOW=", InpLow, " ATR=", atr);
}
Print("Pivot Calculated: P=", PivotP, " R1=", PivotR1, " S1=", PivotS1);
@@ -257,8 +257,8 @@ bool IsRangingMarket()
}
}
double actualHigh = (HIGH > 0) ? HIGH : PivotR1;
double actualLow = (LOW > 0) ? LOW : PivotS1;
double actualHigh = (InpHigh > 0) ? InpHigh : PivotR1;
double actualLow = (InpLow > 0) ? InpLow : PivotS1;
if(currentPrice > actualHigh || currentPrice < actualLow)
{
@@ -584,8 +584,8 @@ void CloseAllPositions(string reason)
//+------------------------------------------------------------------+
bool IsBreakout()
{
double actualHigh = (HIGH > 0) ? HIGH : PivotR1;
double actualLow = (LOW > 0) ? LOW : PivotS1;
double actualHigh = (InpHigh > 0) ? InpHigh : PivotR1;
double actualLow = (InpLow > 0) ? InpLow : PivotS1;
double s2 = PivotS2;
double r2 = PivotR2;
double currentPrice = SymbolInfoDouble(_Symbol, SYMBOL_BID);
@@ -715,8 +715,8 @@ void OnTick()
}
// Get grid boundaries
double actualHigh = (HIGH > 0) ? HIGH : PivotR1;
double actualLow = (LOW > 0) ? LOW : PivotS1;
double actualHigh = (InpHigh > 0) ? InpHigh : PivotR1;
double actualLow = (InpLow > 0) ? InpLow : PivotS1;
double currentPrice = SymbolInfoDouble(_Symbol, SYMBOL_BID);
double point = SymbolInfoDouble(_Symbol, SYMBOL_POINT);
double entryPips = Entry * point;