This commit is contained in:
2025-04-22 19:56:02 +03:30
parent 168f2c58d1
commit 9d36b16ee4
3 changed files with 350 additions and 25 deletions
+101 -17
View File
@@ -77,6 +77,8 @@ class XCXCAEAPOIDrawer : public XCBase
color valePivotColor;
color sameHHPivotColor;
color sameLLPivotColor;
color ticksBullishColor;
color ticksBearishColor;
color kiBullishPivotColor;
color kiBearishPivotColor;
color fvgBullishPivotColor;
@@ -96,6 +98,8 @@ class XCXCAEAPOIDrawer : public XCBase
int valePivotWidth;
int sameHHPivotWidth;
int sameLLPivotWidth;
int ticksBullishWidth;
int ticksBearishWidth;
int kiBullishPivotWidth;
int kiBearishPivotWidth;
int fvgBullishPivotWidth;
@@ -115,6 +119,8 @@ class XCXCAEAPOIDrawer : public XCBase
ENUM_LINE_STYLE valePivotStyle;
ENUM_LINE_STYLE sameHHPivotStyle;
ENUM_LINE_STYLE sameLLPivotStyle;
ENUM_LINE_STYLE ticksBullishStyle;
ENUM_LINE_STYLE ticksBearishStyle;
ENUM_LINE_STYLE kiBullishPivotStyle;
ENUM_LINE_STYLE kiBearishPivotStyle;
ENUM_LINE_STYLE fvgBullishPivotStyle;
@@ -125,7 +131,6 @@ class XCXCAEAPOIDrawer : public XCBase
ENUM_LINE_STYLE oscsBearishPivotStyle;
ENUM_LINE_STYLE trendBullishPivotStyle;
ENUM_LINE_STYLE trendBearishPivotStyle;
//
// Constructors ...
XCXCAEAPOIDrawer(
@@ -229,6 +234,8 @@ class XCXCAEAPOIDrawer : public XCBase
valePivotColor = defBullishPivotColor;
sameHHPivotColor = defBearishPivotColor;
sameLLPivotColor = defBullishPivotColor;
ticksBullishColor = defBearishPivotColor;
ticksBearishColor = defBullishPivotColor;
kiBullishPivotColor = defBullishPivotColor;
kiBearishPivotColor = defBearishPivotColor;
fvgBullishPivotColor = defBullishPivotColor;
@@ -248,6 +255,8 @@ class XCXCAEAPOIDrawer : public XCBase
valePivotWidth = defBullishPivotWidth;
sameHHPivotWidth = defBearishPivotWidth;
sameLLPivotWidth = defBullishPivotWidth;
ticksBullishWidth = defBearishPivotWidth;
ticksBearishWidth = defBullishPivotWidth;
kiBullishPivotWidth = defBullishPivotWidth;
kiBearishPivotWidth = defBearishPivotWidth;
fvgBullishPivotWidth = defBullishPivotWidth;
@@ -267,6 +276,8 @@ class XCXCAEAPOIDrawer : public XCBase
valePivotStyle = defBullishPivotStyle;
sameHHPivotStyle = defBearishPivotStyle;
sameLLPivotStyle = defBullishPivotStyle;
ticksBullishStyle = defBearishPivotStyle;
ticksBearishStyle = defBullishPivotStyle;
kiBullishPivotStyle = defBullishPivotStyle;
kiBearishPivotStyle = defBearishPivotStyle;
fvgBullishPivotStyle = defBullishPivotStyle;
@@ -281,7 +292,7 @@ class XCXCAEAPOIDrawer : public XCBase
void Draw(datetime to = NULL)
{
//
DrawTicks();
DrawTicks(to);
DrawSWHPivots(to);
DrawSWLPivots(to);
DrawPeakPivots(to);
@@ -315,7 +326,7 @@ class XCXCAEAPOIDrawer : public XCBase
//
//
void DrawTicks()
void DrawTicks(datetime to = NULL)
{
//
if (!drawTicks)
@@ -323,41 +334,114 @@ class XCXCAEAPOIDrawer : public XCBase
return;
}
//
bool canUpdateTo = IsValid(to);
//
// PEAK TICKS ...
bool has = detector.HasPeakTicks();
if (has) {
if (has)
{
//
int count = detector.CountPeakTicks();
for (int i = 0; i < count; i++) {
for (int i = 0; i < count; i++)
{
//
XCTicksZoneObject *iObj;
has = drawer.CreateTicksZone(
detector.peakTicks[i].zone,
XCAPVTick iPVTick = detector.peakTicks[i];
//
// Converts Zone to Box ...
XBoxZone iBox;
has = iPVTick.GetMaxVolumeBox(iBox);
if (!has)
{
//
iBox.Clean();
iPVTick.Clean();
//
continue;
}
if (canUpdateTo)
{
iBox.to = to;
}
//
XCBoxObject *iObj;
has = drawer.DrawBox(
iBox,
iObj //
);
if (has) {
mPeakPivotObjects.Add(iObj);
if (has)
{
//
iObj.BoxColor(ticksBearishColor);
iObj.BoxWidth(ticksBearishWidth);
iObj.BoxStyle(ticksBearishStyle);
//
mPeakSWHResPivotObjects.Add(iObj);
}
//
iBox.Clean();
iPVTick.Clean();
ZeroMemory(iObj);
}
}
//
// VALE TICKS ...
has = detector.HasValeTicks();
if (has) {
if (has)
{
//
int count = detector.CountValeTicks();
for (int i = 0; i < count; i++) {
for (int i = 0; i < count; i++)
{
//
XCTicksZoneObject *iObj;
has = drawer.CreateTicksZone(
detector.valeTicks[i].zone,
XCAPVTick iPVTick = detector.valeTicks[i];
//
// Converts Zone to Box ...
XBoxZone iBox;
has = iPVTick.GetMaxVolumeBox(iBox);
if (!has)
{
//
iBox.Clean();
iPVTick.Clean();
//
continue;
}
if (canUpdateTo)
{
iBox.to = to;
}
//
XCBoxObject *iObj;
has = drawer.DrawBox(
iBox,
iObj //
);
if (has) {
mPeakPivotObjects.Add(iObj);
if (has)
{
//
iObj.BoxColor(ticksBullishColor);
iObj.BoxWidth(ticksBullishWidth);
iObj.BoxStyle(ticksBullishStyle);
//
mValeSWLSupPivotObjects.Add(iObj);
}
//
iBox.Clean();
iPVTick.Clean();
ZeroMemory(iObj);
}
}
}