This commit is contained in:
2025-05-18 01:16:06 +03:30
parent 0aeec2c604
commit c3eef12ca0
5 changed files with 2847 additions and 161 deletions
+222 -1
View File
@@ -94,6 +94,8 @@ class XCXCAEAPOIDrawer : public XCBase
bool drawFVGBearishPivots;
bool drawTrendBullishPivots;
bool drawTrendBearishPivots;
bool drawTriggerBlockBullishPivots;
bool drawTriggerBlockBearishPivots;
//
// Styling ...
@@ -122,6 +124,10 @@ class XCXCAEAPOIDrawer : public XCBase
XCAPivotStyle trendBullishPivotStyle;
XCAPivotStyle trendBearishPivotStyle;
//
XCAPivotStyle triggerBlockBullishPivotStyle;
XCAPivotStyle triggerBlockBearishPivotStyle;
//
// Constructors ...
XCXCAEAPOIDrawer(
@@ -169,6 +175,8 @@ class XCXCAEAPOIDrawer : public XCBase
drawFVGBearishPivots = false;
drawTrendBullishPivots = false;
drawTrendBearishPivots = false;
drawTriggerBlockBullishPivots = false;
drawTriggerBlockBearishPivots = false;
//
// Styling ...
@@ -212,6 +220,11 @@ class XCXCAEAPOIDrawer : public XCBase
// TREND ...
trendBullishPivotStyle = defaultBullishStyle;
trendBearishPivotStyle = defaultBearishStyle;
//
// TRIGGER ...
triggerBlockBullishPivotStyle = defaultBullishStyle;
triggerBlockBearishPivotStyle = defaultBearishStyle;
}
//
@@ -241,13 +254,19 @@ class XCXCAEAPOIDrawer : public XCBase
// TREND ...
DrawTrendBullishPivots(to);
DrawTrendBearishPivots(to);
//
// TRIGGER ...
DrawTriggerBullishPivots(to);
DrawTriggerBearishPivots(to);
}
//
void DrawPivot(
XBoxZone &pivot,
datetime to = NULL //
) {
)
{
//
DrawBox(
pivot,
@@ -384,6 +403,24 @@ class XCXCAEAPOIDrawer : public XCBase
to //
);
break;
//
case XCA_TRIGGER_BULL:
//
DrawTriggerBlockBullishPivot(
box,
to //
);
break;
//
case XCA_TRIGGER_BEAR:
//
DrawTriggerBlockBearishPivot(
box,
to //
);
break;
}
}
//
@@ -889,6 +926,76 @@ class XCXCAEAPOIDrawer : public XCBase
}
}
//
void DrawTriggerBullishPivots(datetime to = NULL)
{
//
bool has = drawTriggerBlockBullishPivots;
if (!has)
{
return;
}
//
has = detector.HasTriggerBlockBullishPivots();
if (!has)
{
return;
}
//
int count = detector.CountTriggerBlockBullishPivots();
for (int i = 0; i < count; i++)
{
//
XBoxZone iBox = detector.triggerBlockBullishPivots[i];
//
DrawTriggerBlockBullishPivot(
iBox,
to //
);
//
iBox.Clean();
}
}
//
void DrawTriggerBearishPivots(datetime to = NULL)
{
//
bool has = drawTriggerBlockBearishPivots;
if (!has)
{
return;
}
//
has = detector.HasTriggerBlockBearishPivots();
if (!has)
{
return;
}
//
int count = detector.CountTriggerBlockBearishPivots();
for (int i = 0; i < count; i++)
{
//
XBoxZone iBox = detector.triggerBlockBearishPivots[i];
//
DrawTriggerBlockBearishPivot(
iBox,
to //
);
//
iBox.Clean();
}
}
//
// One Item Drawers ...
@@ -1422,6 +1529,116 @@ class XCXCAEAPOIDrawer : public XCBase
ZeroMemory(iObj);
}
//
void DrawTriggerBlockBullishPivot(
XBoxZone &item,
datetime to = NULL //
)
{
//
bool has = drawTriggerBlockBullishPivots;
if (!has)
{
return;
}
//
has = item.IsValid() &&
item.type == GetBoxType(XCA_TRIGGER_BULL) &&
item.dir == GetDirection(XCA_TRIGGER_BULL);
if (!has)
{
return;
}
//
// Since Trigger Blocks only Used Once ...
to = NULL;
bool canUpdateTo = IsValid(to);
if (canUpdateTo)
{
item.to = to;
}
//
XCBoxObject *iObj;
has = drawer.DrawBox(
item,
iObj //
);
if (has)
{
//
// Style Object ...
ApplyPivotStyle(
iObj,
triggerBlockBullishPivotStyle //
);
//
// Store Object ...
mTriggerBlockBullishPivotObjects.Add(iObj);
}
//
ZeroMemory(iObj);
}
//
void DrawTriggerBlockBearishPivot(
XBoxZone &item,
datetime to = NULL //
)
{
//
bool has = drawTriggerBlockBearishPivots;
if (!has)
{
return;
}
//
has = item.IsValid() &&
item.type == GetBoxType(XCA_TRIGGER_BEAR) &&
item.dir == GetDirection(XCA_TRIGGER_BEAR);
if (!has)
{
return;
}
//
// Since Trigger Blocks only Used Once ...
to = NULL;
bool canUpdateTo = IsValid(to);
if (canUpdateTo)
{
item.to = to;
}
//
XCBoxObject *iObj;
has = drawer.DrawBox(
item,
iObj //
);
if (has)
{
//
// Style Object ...
ApplyPivotStyle(
iObj,
triggerBlockBearishPivotStyle //
);
//
// Store Object ...
mTriggerBlockBearishPivotObjects.Add(iObj);
}
//
ZeroMemory(iObj);
}
//
// Protected ...
protected:
@@ -1479,6 +1696,10 @@ class XCXCAEAPOIDrawer : public XCBase
CArrayObj mTrendBullishPivotObjects;
CArrayObj mTrendBearishPivotObjects;
//
CArrayObj mTriggerBlockBullishPivotObjects;
CArrayObj mTriggerBlockBearishPivotObjects;
//
};