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