add support of Consolidation Zone ibside XPOIDetector and XPOIState ...

This commit is contained in:
2025-02-26 22:34:40 +03:30
parent 476bcaece8
commit af9c398338
14 changed files with 1993 additions and 1986 deletions
+62 -2
View File
@@ -2964,7 +2964,7 @@ class XCPOIDrawer : public XCBase
int window = SubWindowIdentification();
//
color czColor = IsBullish(zone.breakDir)
color czColor = IsBullish(zone.dir)
? BarBullishColor()
: BarBearishColor();
@@ -3460,7 +3460,9 @@ class XCPOIDrawer : public XCBase
bool ignoreBullishRejectionBars = false,
bool ignoreBearishRejectionBars = false,
bool ignoreBullishMomentumBars = false,
bool ignoreBearishMomentumBars = false //
bool ignoreBearishMomentumBars = false,
bool ignoreBullishConsolidationZones = false,
bool ignoreBearishConsolidationZones = false //
)
{
//
@@ -3924,6 +3926,64 @@ class XCPOIDrawer : public XCBase
}
}
//
// Bullish Consolidation Zones ...
if (!ignoreBullishConsolidationZones)
{
//
int count = state.CountBullishConsolidationZones();
if (IsValidSize(count))
{
//
for (int i = 0; i < count; i++)
{
//
XCConsolidationZoneObject *iObj;
bool isCreated = CreateConsolidationZone(
state.bullishConsolidationZones[i],
iObj //
);
if (isCreated)
{
//
Add(
(XCBaseObject *)iObj,
drawnObjects //
);
}
}
}
}
//
// Bearish Consolidation Zones ...
if (!ignoreBearishConsolidationZones)
{
//
int count = state.CountBearishConsolidationZones();
if (IsValidSize(count))
{
//
for (int i = 0; i < count; i++)
{
//
XCConsolidationZoneObject *iObj;
bool isCreated = CreateConsolidationZone(
state.bearishConsolidationZones[i],
iObj //
);
if (isCreated)
{
//
Add(
(XCBaseObject *)iObj,
drawnObjects //
);
}
}
}
}
//
result = ArraySize(drawnObjects);