This commit is contained in:
2025-04-22 13:07:47 +03:30
parent a3a02973ef
commit 168f2c58d1
7 changed files with 437 additions and 55 deletions
+60 -4
View File
@@ -13,6 +13,7 @@
//////////////////////////////////////////////////////
//
// Global Properties ...
#property library
#property copyright "Copyright 2023, SaherElm IT Center"
#property link "https://saherelm.ir"
#property version "1.00"
@@ -65,6 +66,9 @@ class XCXCAEAPOIDrawer : public XCBase
bool drawCCICrossedOverOSPivots;
bool drawCCICrossedUnderOBPivots;
//
bool drawTicks;
//
// Colorize Props ...
@@ -212,6 +216,9 @@ class XCXCAEAPOIDrawer : public XCBase
drawCCICrossedOverOSPivots = false;
drawCCICrossedUnderOBPivots = false;
//
drawTicks = false;
//
// Color ...
defBullishPivotColor = clrLime;
@@ -274,6 +281,7 @@ class XCXCAEAPOIDrawer : public XCBase
void Draw(datetime to = NULL)
{
//
DrawTicks();
DrawSWHPivots(to);
DrawSWLPivots(to);
DrawPeakPivots(to);
@@ -306,6 +314,54 @@ class XCXCAEAPOIDrawer : public XCBase
//
//
//
void DrawTicks()
{
//
if (!drawTicks)
{
return;
}
//
// PEAK TICKS ...
bool has = detector.HasPeakTicks();
if (has) {
//
int count = detector.CountPeakTicks();
for (int i = 0; i < count; i++) {
//
XCTicksZoneObject *iObj;
has = drawer.CreateTicksZone(
detector.peakTicks[i].zone,
iObj //
);
if (has) {
mPeakPivotObjects.Add(iObj);
}
}
}
//
// VALE TICKS ...
has = detector.HasValeTicks();
if (has) {
//
int count = detector.CountValeTicks();
for (int i = 0; i < count; i++) {
//
XCTicksZoneObject *iObj;
has = drawer.CreateTicksZone(
detector.valeTicks[i].zone,
iObj //
);
if (has) {
mPeakPivotObjects.Add(iObj);
}
}
}
}
//
void DrawSWHPivots(datetime to = NULL)
{
@@ -725,11 +781,11 @@ class XCXCAEAPOIDrawer : public XCBase
for (int i = 0; i < count; i++)
{
//
XCAPVFVG iPVFVG = detector.pvFVGBullishPivots[i];
XCAPVPivot iPVFVG = detector.pvFVGBullishPivots[i];
//
XBoxZone fvgBoxes[];
int fvgBoxesCount = iPVFVG.GetFVGs(fvgBoxes);
int fvgBoxesCount = iPVFVG.GetPivots(fvgBoxes);
has = IsValidSize(fvgBoxesCount);
if (has)
{
@@ -840,11 +896,11 @@ class XCXCAEAPOIDrawer : public XCBase
for (int i = 0; i < count; i++)
{
//
XCAPVFVG iPVFVG = detector.pvFVGBearishPivots[i];
XCAPVPivot iPVFVG = detector.pvFVGBearishPivots[i];
//
XBoxZone fvgBoxes[];
int fvgBoxesCount = iPVFVG.GetFVGs(fvgBoxes);
int fvgBoxesCount = iPVFVG.GetPivots(fvgBoxes);
has = IsValidSize(fvgBoxesCount);
if (has)
{