Complete Fair Value Gaps Detetion ...

This commit is contained in:
2024-11-14 15:34:51 +03:30
parent 849fc73ee2
commit 53f3f94b75
7 changed files with 14382 additions and 126 deletions
+247 -87
View File
@@ -223,6 +223,141 @@ class XCBarAnalyser : public XCBase
return result; return result;
} }
/**
* Detect Same Bars ...
*
* @param bar: XOHCL instance, Start Bar ...
* @param dir: ENUM_X_DIRECTION member, Holds Result Direction ...
* @param index: Integer, Holds Result Index ...
* @param sameBars: Iteger, Required Same Bar ...
*
* @return ( bool )
*/
bool HasSameBars(
XOHCL &bar,
ENUM_X_DIRECTION &dir,
int &index,
int sameBars = 3 //
)
{
//
bool result = false;
//
dir = X_DIRECTION_NONE;
//
if (sameBars < 1)
{
sameBars = 1;
}
//
result = bar.IsValid();
if (!result)
{
return result;
}
//
index = bar.Index();
bool canContinue = true;
int sameBullishBarsFounded = 0;
int sameBearishBarsFounded = 0;
bool canContinueForBullish = true;
bool canContinueForBearish = true;
while (canContinue)
{
//
XOHCL iBar;
result = iBar.Init(
bar.symbol,
bar.period,
index //
);
if (!result)
{
break;
}
//
bool isBullish = iBar.IsBullish();
bool isBearish = iBar.IsBearish();
result = isBullish ||
isBearish;
if (!result)
{
break;
}
//
if (isBullish)
{
//
sameBullishBarsFounded++;
canContinueForBearish = false;
}
else
{
//
sameBearishBarsFounded++;
canContinueForBullish = false;
}
//
result = canContinueForBullish ||
canContinueForBearish;
if (!result)
{
break;
}
//
canContinueForBullish =
canContinueForBullish &&
sameBullishBarsFounded > 0;
//
canContinueForBearish =
canContinueForBearish &&
sameBearishBarsFounded > 0;
//
canContinue =
canContinueForBullish ||
canContinueForBearish;
if (canContinue)
{
index++;
}
}
//
bool hasBullishSameBars =
sameBullishBarsFounded >= sameBars;
//
bool hasBearishSameBars =
sameBearishBarsFounded >= sameBars;
//
result = hasBullishSameBars ||
hasBearishSameBars;
if (!result)
{
return result;
}
//
dir =
hasBullishSameBars
? X_DIRECTION_BULLISH
: X_DIRECTION_BEARISH;
//
return result;
}
/** /**
* Detect Consolidation Range ... * Detect Consolidation Range ...
* *
@@ -1041,89 +1176,13 @@ class XCBarAnalyser : public XCBase
} }
// //
int index = bar.Index(); int index = 0;
bool canContinue = true; result = HasSameBars(
int sameBullishBarsFounded = 0; bar,
int sameBearishBarsFounded = 0; dir,
bool canContinueForBullish = true; index,
bool canContinueForBearish = true; sameBars //
while (canContinue) );
{
//
XOHCL iBar;
result = iBar.Init(
bar.symbol,
bar.period,
index //
);
if (!result)
{
break;
}
//
bool isBullish = iBar.IsBullish();
bool isBearish = iBar.IsBearish();
result = isBullish ||
isBearish;
if (!result)
{
break;
}
//
if (isBullish)
{
//
sameBullishBarsFounded++;
canContinueForBearish = false;
}
else
{
//
sameBearishBarsFounded++;
canContinueForBullish = false;
}
//
result = canContinueForBullish ||
canContinueForBearish;
if (!result)
{
break;
}
//
canContinueForBullish =
canContinueForBullish &&
sameBullishBarsFounded > 0;
//
canContinueForBearish =
canContinueForBearish &&
sameBearishBarsFounded > 0;
//
canContinue =
canContinueForBullish ||
canContinueForBearish;
if (canContinue)
{
index++;
}
}
//
bool hasBullishOB =
sameBullishBarsFounded >= sameBars;
//
bool hasBearishOB =
sameBearishBarsFounded >= sameBars;
//
result = hasBullishOB ||
hasBearishOB;
if (!result) if (!result)
{ {
return result; return result;
@@ -1142,10 +1201,111 @@ class XCBarAnalyser : public XCBase
} }
// //
dir = return result;
hasBullishOB }
? X_DIRECTION_BULLISH
: X_DIRECTION_BEARISH; //
// Fair Value Gaps ...
/**
* Detect a Fair Value Gap Based on Given Bar ...
*
* @param bar: XOHCL instance, Specified Start Bar ...
* @param dir: ENUM_X_DIRECTION member, Specified Founded Order Block Direction ...
* @param sameBars: Integer, Specified Min Same Bars for Detecting Order Block ...
*
* @return ( bool )
*/
bool HasFairValueGap(
XOHCL &bar,
XOHCL &prevBar,
XOHCL &nextBar,
ENUM_X_DIRECTION &dir,
int sameBars = 3 //
)
{
//
bool result = false;
//
prevBar.Clean();
nextBar.Clean();
dir = X_DIRECTION_NONE;
//
if (sameBars < 1)
{
sameBars = 1;
}
//
result = bar.IsValid();
if (!result)
{
return result;
}
//
int index = 0;
result = HasSameBars(
bar,
dir,
index,
sameBars //
);
if (!result)
{
return result;
}
//
bool isBullish = IsBullish(dir);
//
int to = bar.Index() + 1;
int from = index + 1;
for (int i = from; i > to; i--)
{
//
result = prevBar.Init(
bar.symbol,
bar.period,
i //
);
if (!result)
{
break;
}
//
result = nextBar.Init(
bar.symbol,
bar.period,
i - 2 //
);
if (!result)
{
break;
}
//
result = isBullish
? prevBar.high < nextBar.low
: prevBar.low > nextBar.high;
if (result)
{
break;
}
}
//
if (!result)
{
//
prevBar.Clean();
nextBar.Clean();
dir = X_DIRECTION_NONE;
}
// //
return result; return result;
+138 -2
View File
@@ -885,12 +885,16 @@ class XCZoneObject : public XCBaseObject
// //
bool result = false; bool result = false;
//
bool isValidFrom = zone.IsValidFrom();
bool isValidBoundary = zone.IsValidBoundary();
// //
result = result =
// //
IsValid(name) && IsValid(name) &&
zone.IsValidFrom() && isValidFrom &&
zone.IsValidBoundary() isValidBoundary
// //
; ;
if (!result) if (!result)
@@ -1397,3 +1401,135 @@ class XCBearishOrderBlockObject : public XCZoneObject
}; };
// //
// Bullish Fair Value Gaps ...
class XCBullishFairValueGapObject : public XCZoneObject
{
//
public:
//
/**
* Creator ...
*
* @param chart_id: Long, Specified Chart ID ...
* @param window: Integer, Specified Chart Window ID ...
* @param zone: XCOrderBlock instance ...
* @param prefix: String ...
*
* @return ( bool )
*/
bool Create(
long chart_id,
int window,
XCFVG &zone,
string prefix = NULL //
)
{
//
bool result = false;
//
result = zone.IsValid() &&
zone.IsBullish();
if (!result)
{
return result;
}
//
string name = zone.GetTag();
//
result = CreateByZone(
chart_id,
name,
window,
zone,
prefix //
);
//
return result;
}
//
// Virtual ...
/**
* Retrieve Object Type ...
*
* @return ( ENUM_XCHARTOBJECTS )
*/
virtual ENUM_XCHARTOBJECTS Type()
{
return X_BULLISH_FVG_OBJ;
}
};
//
// Bearish Fair Value Gaps ...
class XCBearishFairValueGapObject : public XCZoneObject
{
//
public:
//
/**
* Creator ...
*
* @param chart_id: Long, Specified Chart ID ...
* @param window: Integer, Specified Chart Window ID ...
* @param zone: XCOrderBlock instance ...
* @param prefix: String ...
*
* @return ( bool )
*/
bool Create(
long chart_id,
int window,
XCFVG &zone,
string prefix = NULL //
)
{
//
bool result = false;
//
result = zone.IsValid() &&
zone.IsBearish();
if (!result)
{
return result;
}
//
string name = zone.GetTag();
//
result = CreateByZone(
chart_id,
name,
window,
zone,
prefix //
);
//
return result;
}
//
// Virtual ...
/**
* Retrieve Object Type ...
*
* @return ( ENUM_XCHARTOBJECTS )
*/
virtual ENUM_XCHARTOBJECTS Type()
{
return X_BEARISH_FVG_OBJ;
}
};
//
+450
View File
@@ -407,6 +407,36 @@ class XCPOIDetector : public XCBaseAlert
mOrderBlocksSameBars = value; mOrderBlocksSameBars = value;
} }
//
// Fair Value Gaps ...
/**
* Get Fair Value Gaps Detection Same Bars ...
*
* @return ( int )
*/
int FairValueGapsSameBars()
{
return mFairValueGapsSameBars;
}
/**
* Set Fair Value Gaps Detection Same Bars ...
*
* @param value: Integer ...
*/
void FairValueGapsSameBars(int value)
{
//
if (value < 0)
{
value = 0;
}
//
mFairValueGapsSameBars = value;
}
// //
// Actions ... // Actions ...
@@ -860,6 +890,68 @@ class XCPOIDetector : public XCBaseAlert
} }
} }
//
// Fair Value Gaps ...
int fvgSameBars = FairValueGapsSameBars();
if (fvgSameBars > 0)
{
//
// Bullish Fair Value Gap ...
isDetected = DetectBullishFairValueGap(cBar);
if (isDetected)
{
//
ENUM_XPOI_EVENTS event = X_BULLISH_FVG_DETECTED;
XCFVG *param;
bool hasItem = GetLastItem(
param,
mBullishFairValueGaps //
);
if (hasItem)
{
//
NotifyEventListeners(
event,
param //
);
}
//
Add(
event,
state //
);
}
//
// Bearish Fair Value Gap ...
isDetected = DetectBearishFairValueGap(cBar);
if (isDetected)
{
//
ENUM_XPOI_EVENTS event = X_BEARISH_FVG_DETECTED;
XCFVG *param;
bool hasItem = GetLastItem(
param,
mBearishFairValueGaps //
);
if (hasItem)
{
//
NotifyEventListeners(
event,
param //
);
}
//
Add(
event,
state //
);
}
}
// //
ValidatePOIs(cBar); ValidatePOIs(cBar);
@@ -959,6 +1051,10 @@ class XCPOIDetector : public XCBaseAlert
// //
Clean(mBullishOrderBlocks); Clean(mBullishOrderBlocks);
Clean(mBearishOrderBlocks); Clean(mBearishOrderBlocks);
//
Clean(mBullishFairValueGaps);
Clean(mBearishFairValueGaps);
} }
/** /**
@@ -1010,6 +1106,9 @@ class XCPOIDetector : public XCBaseAlert
// //
OrderBlocksSameBars(3); OrderBlocksSameBars(3);
//
FairValueGapsSameBars(3);
} }
// //
@@ -1086,6 +1185,10 @@ class XCPOIDetector : public XCBaseAlert
int bullishOrderBlocksCount = 0; int bullishOrderBlocksCount = 0;
int bearishOrderBlocksCount = 0; int bearishOrderBlocksCount = 0;
//
int bullishFairValueGapsCount = 0;
int bearishFairValueGapsCount = 0;
// //
bool canContinue = true; bool canContinue = true;
@@ -1192,6 +1295,28 @@ class XCPOIDetector : public XCBaseAlert
} }
} }
//
// Fair Value Gaps ...
int fvgSameBars = FairValueGapsSameBars();
if (fvgSameBars > 0)
{
//
// Bullish Fair Value Gaps ...
bullishFairValueGapsCount = DetectRequiredBullishFairValueGaps(barIndex);
if (bullishFairValueGapsCount == requiredPOIs)
{
ArrayReverse(mBullishFairValueGaps);
}
//
// Bearish Fair Value Gaps ...
bearishFairValueGapsCount = DetectRequiredBearishFairValueGaps(barIndex);
if (bearishFairValueGapsCount == requiredPOIs)
{
ArrayReverse(mBearishFairValueGaps);
}
}
// //
canContinue = canContinue =
// //
@@ -1253,6 +1378,16 @@ class XCPOIDetector : public XCBaseAlert
// Bearish Order Blocks ... // Bearish Order Blocks ...
bearishOrderBlocksCount < requiredPOIs bearishOrderBlocksCount < requiredPOIs
// //
||
//
// Bullish Fair Value Gaps ...
bullishFairValueGapsCount < requiredPOIs
//
||
//
// Bearish Fair Value Gaps ...
bearishFairValueGapsCount < requiredPOIs
//
; ;
if (canContinue) if (canContinue)
{ {
@@ -3439,12 +3574,327 @@ class XCPOIDetector : public XCBaseAlert
// //
// Fair Value Gaps ... // Fair Value Gaps ...
int mFairValueGapsSameBars; // Fair Value Gaps Detection Same Bars ...
// //
// Bullish FVG ... // Bullish FVG ...
XCFVG *mBullishFairValueGaps[];
/**
* Detect Bullish Fair Value Gap ...
*
* @param bar: XOHCL instance ...
*
* @return ( bool )
*/
bool DetectBullishFairValueGap(XOHCL &bar)
{
//
bool result = false;
//
result = bar.IsValid();
if (!result)
{
return result;
}
//
int sameBars = FairValueGapsSameBars();
if (sameBars < 0)
{
return result;
}
//
XOHCL prevBar;
XOHCL nextBar;
ENUM_X_DIRECTION dir;
result = mBarAnalyser
.HasFairValueGap(
bar,
prevBar,
nextBar,
dir,
sameBars //
);
result =
result &&
dir == X_DIRECTION_BULLISH;
if (!result)
{
return result;
}
//
if (result)
{
//
XCFVG *fvg;
fvg = new XCFVG();
result = fvg.Init(
prevBar,
nextBar,
dir //
);
//
if (result)
{
//
datetime cTime = TimeCurrent();
fvg.To(cTime);
//
Add(
fvg,
mBullishFairValueGaps //
);
// //
// XCBullishFairValueGapObject *iObj;
// bool isCreated = mDrawer.CreateBullishFairValueGap(
// fvg,
// iObj //
// );
// if (isCreated)
// {
// AddObjectIfNotExists(iObj);
// }
}
}
//
return result;
}
/**
* Detect Required Bullish Fair Value Gaps ...
*
* @param barIndex: Integer Start bar index ...
* 0 is Default ...
*
* @return ( int )
*/
int DetectRequiredBullishFairValueGaps(int barIndex)
{
//
int result = 0;
//
if (barIndex < 0)
{
barIndex = 0;
}
//
int required = MaxNumberOfRequiredPOIs();
if (required <= 0)
{
return result;
}
//
int count = ArraySize(mBullishFairValueGaps);
if (count >= required)
{
//
result = count;
return result;
}
//
int sameBars = FairValueGapsSameBars();
if (sameBars < 0)
{
return result;
}
//
string symbol = GetSymbol();
ENUM_TIMEFRAMES period = GetPeriod();
//
XOHCL bar;
bool isInited = bar.Init(
symbol,
period,
barIndex //
);
if (!isInited)
{
return result;
}
//
DetectBullishFairValueGap(bar);
//
result = ArraySize(mBullishFairValueGaps);
//
return result;
}
// //
// Bearish FVG ... // Bearish FVG ...
XCFVG *mBearishFairValueGaps[];
/**
* Detect Bearish Fair Value Gap ...
*
* @param bar: XOHCL instance ...
*
* @return ( bool )
*/
bool DetectBearishFairValueGap(XOHCL &bar)
{
//
bool result = false;
//
result = bar.IsValid();
if (!result)
{
return result;
}
//
int sameBars = FairValueGapsSameBars();
if (sameBars < 0)
{
return result;
}
//
XOHCL prevBar;
XOHCL nextBar;
ENUM_X_DIRECTION dir;
result = mBarAnalyser
.HasFairValueGap(
bar,
prevBar,
nextBar,
dir,
sameBars //
);
result =
result &&
dir == X_DIRECTION_BEARISH;
if (!result)
{
return result;
}
//
if (result)
{
//
XCFVG *fvg;
fvg = new XCFVG();
result = fvg.Init(
prevBar,
nextBar,
dir //
);
//
if (result)
{
//
datetime cTime = TimeCurrent();
fvg.To(cTime);
//
Add(
fvg,
mBearishFairValueGaps //
);
// //
// XCBearishFairValueGapObject *iObj;
// bool isCreated = mDrawer.CreateBearishFairValueGap(
// fvg,
// iObj //
// );
// if (isCreated)
// {
// AddObjectIfNotExists(iObj);
// }
}
}
//
return result;
}
/**
* Detect Required Bearish Fair Value Gaps ...
*
* @param barIndex: Integer Start bar index ...
* 0 is Default ...
*
* @return ( int )
*/
int DetectRequiredBearishFairValueGaps(int barIndex)
{
//
int result = 0;
//
if (barIndex < 0)
{
barIndex = 0;
}
//
int required = MaxNumberOfRequiredPOIs();
if (required <= 0)
{
return result;
}
//
int count = ArraySize(mBearishFairValueGaps);
if (count >= required)
{
//
result = count;
return result;
}
//
int sameBars = FairValueGapsSameBars();
if (sameBars < 0)
{
return result;
}
//
string symbol = GetSymbol();
ENUM_TIMEFRAMES period = GetPeriod();
//
XOHCL bar;
bool isInited = bar.Init(
symbol,
period,
barIndex //
);
if (!isInited)
{
return result;
}
//
DetectBearishFairValueGap(bar);
//
result = ArraySize(mBearishFairValueGaps);
//
return result;
}
// //
// Liquidity Zones ... // Liquidity Zones ...
+129 -3
View File
@@ -1109,7 +1109,7 @@ class XCPOIDrawer : public XCBase
*/ */
void BullishFVGFill(bool value) void BullishFVGFill(bool value)
{ {
mBearishFVGFill = value; mBullishFVGFill = value;
} }
/** /**
@@ -1352,13 +1352,13 @@ class XCPOIDrawer : public XCBase
BearishOrderBlockColor(clrRed); BearishOrderBlockColor(clrRed);
// //
BullishFVGFill(true); BullishFVGFill(false);
BullishFVGWidth(1); BullishFVGWidth(1);
BullishFVGStyle(STYLE_DOT); BullishFVGStyle(STYLE_DOT);
BullishFVGColor(clrLime); BullishFVGColor(clrLime);
// //
BearishFVGFill(true); BearishFVGFill(false);
BearishFVGWidth(1); BearishFVGWidth(1);
BearishFVGStyle(STYLE_DOT); BearishFVGStyle(STYLE_DOT);
BearishFVGColor(clrRed); BearishFVGColor(clrRed);
@@ -2014,6 +2014,9 @@ class XCPOIDrawer : public XCBase
return result; return result;
} }
//
// Order Blocks ...
/** /**
* Create Bullish Order Block Object ... * Create Bullish Order Block Object ...
* *
@@ -2142,6 +2145,129 @@ class XCPOIDrawer : public XCBase
return result; return result;
} }
//
// Fair Value Gaps ...
/**
* Create Bullish Fair Value Gap Object ...
*
* @param zone: XCFVG instance ...
* @param object: XCBullishOrderBlockObject pointer ...
*
* @return ( bool )
*/
bool CreateBullishFairValueGap(
XCFVG &zone,
XCBullishFairValueGapObject *&object //
)
{
//
bool result = false;
//
result = zone.IsValid() &&
zone.IsBullish();
if (!result)
{
return result;
}
//
string prefix = Prefix();
long chartID = ChartIdentification();
int window = SubWindowIdentification();
//
bool fill = BullishFVGFill();
int width = BullishFVGWidth();
color crl = BullishFVGColor();
ENUM_LINE_STYLE style = BullishFVGStyle();
//
object = new XCBullishFairValueGapObject();
result = object.Create(
chartID,
window,
zone,
prefix //
);
//
if (!result)
{
return result;
}
//
object.ZoneFill(fill);
object.ZoneColor(crl);
object.ZoneWidth(width);
object.ZoneStyle(style);
//
return result;
}
/**
* Create Bearish Fair Value Gap Object ...
*
* @param zone: XCFVG instance ...
* @param object: XCBearishOrderBlockObject pointer ...
*
* @return ( bool )
*/
bool CreateBearishFairValueGap(
XCFVG &zone,
XCBearishFairValueGapObject *&object //
)
{
//
bool result = false;
//
result = zone.IsValid() &&
zone.IsBearish();
if (!result)
{
return result;
}
//
string prefix = Prefix();
long chartID = ChartIdentification();
int window = SubWindowIdentification();
//
bool fill = BearishFVGFill();
int width = BearishFVGWidth();
color crl = BearishFVGColor();
ENUM_LINE_STYLE style = BearishFVGStyle();
//
object = new XCBearishFairValueGapObject();
result = object.Create(
chartID,
window,
zone,
prefix //
);
//
if (!result)
{
return result;
}
//
object.ZoneFill(fill);
object.ZoneColor(crl);
object.ZoneWidth(width);
object.ZoneStyle(style);
//
return result;
}
// //
protected: protected:
// //
File diff suppressed because it is too large Load Diff
+25
View File
@@ -1216,6 +1216,31 @@ struct XOHCL
return result; return result;
} }
//
// Get Direction of Bar ...
ENUM_X_DIRECTION GetDirection()
{
//
ENUM_X_DIRECTION result = X_DIRECTION_NONE;
//
bool isBullish = IsBullish();
bool isBearish = IsBearish();
//
result =
isBullish && isBearish
? X_DIRECTION_ALL
: !isBullish && !isBearish
? X_DIRECTION_NONE
: isBullish
? X_DIRECTION_BULLISH
: X_DIRECTION_BEARISH;
//
return result;
}
// //
// Find Next Bar Time ... // Find Next Bar Time ...
datetime NextAt() datetime NextAt()
+108 -33
View File
@@ -894,6 +894,12 @@ class XCTwoBarZone : public XCZone
// //
result = IsValidTwoBarZone(); result = IsValidTwoBarZone();
if (result)
{
//
From(startBar.time);
To(endBar.time);
}
// //
return result; return result;
@@ -902,6 +908,98 @@ class XCTwoBarZone : public XCZone
// //
// Getter(s) / Setter(s) ... // Getter(s) / Setter(s) ...
/**
* Set From Date ...
*
* @param value: DateTime ...
*/
void From(datetime value)
{
//
if (!IsValidTwoBarZone())
{
return;
}
//
value = NormalizeTime(value);
//
mFrom = value;
}
/**
* Set To Date ...
*
* @param value: DateTime ...
*/
void To(datetime value)
{
//
if (!IsValidTwoBarZone())
{
return;
}
//
value = NormalizeTime(value);
//
mTo = value;
}
/**
* Fill Start Bar ...
*
* @param bar: XOHCL instance ...
*
* @return ( bool )
*/
bool FillStartBar(XOHCL &bar)
{
//
bool result = false;
//
result = IsValidTwoBarZone();
if (!result)
{
return result;
}
//
bar = mStartBar;
//
return result;
}
/**
* Fill End Bar ...
*
* @param bar: XOHCL instance ...
*
* @return ( bool )
*/
bool FillEndBar(XOHCL &bar)
{
//
bool result = false;
//
result = IsValidTwoBarZone();
if (!result)
{
return result;
}
//
bar = mEndBar;
//
return result;
}
// //
// Overrides ... // Overrides ...
@@ -918,38 +1016,12 @@ class XCTwoBarZone : public XCZone
datetime From() override datetime From() override
{ {
// return mFrom;
datetime result = NULL;
//
if (!IsValidTwoBarZone())
{
return result;
}
//
result = mStartBar.time;
//
return result;
} }
datetime To() override datetime To() override
{ {
// return mTo;
datetime result = NULL;
//
if (!IsValidTwoBarZone())
{
return result;
}
//
result = TimeCurrent();
//
return result;
} }
string GetTag() override string GetTag() override
@@ -1031,6 +1103,8 @@ class XCTwoBarZone : public XCZone
private: private:
// //
// Props ... // Props ...
datetime mFrom;
datetime mTo;
// //
}; };
@@ -2158,7 +2232,8 @@ class XCFVG : public XCTwoBarZone
/** /**
* Initialize POI ... * Initialize POI ...
* *
* @param bar: XOHCL instance ... * @param startBar: XOHCL instance ...
* @param endBar: XOHCL instance ...
* @param dir: ENUM_X_DIRECTION member ... * @param dir: ENUM_X_DIRECTION member ...
* *
* @return ( bool ) * @return ( bool )
@@ -2236,7 +2311,7 @@ class XCFVG : public XCTwoBarZone
// //
result = IsValid() && result = IsValid() &&
Type() == X_POI_BULLISH_ORDERBLOCK; Type() == X_POI_BULLISH_FVG;
// //
return result; return result;
@@ -2254,7 +2329,7 @@ class XCFVG : public XCTwoBarZone
// //
result = IsValid() && result = IsValid() &&
Type() == X_POI_BEARISH_ORDERBLOCK; Type() == X_POI_BEARISH_FVG;
// //
return result; return result;
@@ -2270,8 +2345,8 @@ class XCFVG : public XCTwoBarZone
// //
result = IsValidTwoBarZone() && result = IsValidTwoBarZone() &&
(mType == X_POI_BULLISH_ORDERBLOCK || (mType == X_POI_BULLISH_FVG ||
mType == X_POI_BEARISH_ORDERBLOCK); mType == X_POI_BEARISH_FVG);
// //
return result; return result;