add support of Consolidation Zone ibside XPOIDetector and XPOIState ...
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user