This commit is contained in:
2025-03-07 11:53:51 +03:30
parent 5534bde7e5
commit f050a00b44
5 changed files with 1119 additions and 68 deletions
+80 -3
View File
@@ -1324,6 +1324,83 @@ bool HasInsideBox(
return result;
}
bool IsValidBox(
XBoxZone &box,
int barIndex = 0,
ENUM_TIMEFRAMES forPeriod = NULL //
)
{
//
bool result = false;
//
result = box.IsValid();
if (!result)
{
return result;
}
//
if (barIndex < 0)
{
barIndex = 0;
}
//
if (!IsValid(forPeriod))
{
forPeriod = box.period;
}
//
int fromIndex = iBarShift(
box.symbol,
forPeriod,
box.from //
);
result = IsValidIndex(fromIndex);
if (!result)
{
return result;
}
//
XOHCL iBar;
bool isBullish = box.IsBullish();
for (int i = barIndex; i < fromIndex; i++)
{
//
result = iBar.Init(
box.symbol,
forPeriod,
i //
);
if (!result)
{
break;
}
//
result =
isBullish
? iBar.GetDown() > box.lower
: iBar.GetUp() < box.upper;
if (!result)
{
break;
}
//
iBar.Clean();
}
//
iBar.Clean();
//
return result;
}
/**
* Converts to XBoxZone ...
*
@@ -2899,14 +2976,14 @@ int FilterZones(
/**
* Detect Nearest Price Out of Specified Box ...
*
*
* @param box: XBoxZone instance Reference ...
* @param outSideBar: XOHCL instance Reference which Represents Out Side Bar if Exists ...
* @param forPeriod: ENUM_TIMEFRAMES member which provides time frame of Out Bar, if not Provides used box Period as Default ...
* @param forDir: ENUM_X_DIRECTION member which Specified outSide Direction, use Box Dir as Default ...
* @param forDir: ENUM_X_DIRECTION member which Specified outSide Direction, use Box Dir as Default ...
* @param forceBodyIn: bool value which Specifyed Body Breakes or not, Default is false ...
* @param barIndex: integer value which Specified Start Bar Index, Default is 0 ...
*
*
* @return ( bool )
*/
bool DetectBoxNearestPriceOut(
+8 -2
View File
@@ -488,11 +488,17 @@ struct XOBFVG
continue;
}
//
// bool isBarAbove =
// bar.low > iFVG.Upper();
// bool isBarBelow =
// bar.high < iFVG.Lower();
//
bool isBarAbove =
bar.low > iFVG.Upper();
bar.GetDown() > iFVG.Upper();
bool isBarBelow =
bar.high < iFVG.Lower();
bar.GetUp() < iFVG.Lower();
//
isValidFVG =