This commit is contained in:
2025-01-18 12:16:28 +03:30
parent 9cdd5b4c7d
commit e74f64c51e
10 changed files with 2111 additions and 1003 deletions
+107 -21
View File
@@ -3332,9 +3332,9 @@ class XCPOIDrawer : public XCBase
/**
* Draw Specified State Zone ...
*
*
* @param source: XStateZones instance Reference ...
*
*
* @return ( int )
*/
int DrawStateZones(
@@ -4363,6 +4363,7 @@ class XCPOIDrawer : public XCBase
XPVPivot &pivot,
XCBaseObject *&drawnObjects[],
bool drawState = false,
bool drawStateAsBox = false,
bool drawTicksZone = false,
bool ignoreSwingHighs = false,
bool ignoreSwingLows = false,
@@ -4442,25 +4443,107 @@ class XCPOIDrawer : public XCBase
//
XCBaseObject *stateObjects[];
int stateCount = DrawState(
pivot.state,
stateObjects,
drawTicksZone,
ignoreSwingHighs,
ignoreSwingLows,
ignoreSupportZones,
ignoreResistanceZones,
ignoreSupplyZones,
ignoreDemandZones,
ignoreBullishOrderBlocks,
ignoreBearishOrderBlocks,
ignoreBullishFairValueGaps,
ignoreBearishFairValueGaps,
ignoreBullishRejectionBars,
ignoreBearishRejectionBars,
ignoreBullishMomentumBars,
ignoreBearishMomentumBars //
);
int stateCount = 0;
//
if (!drawStateAsBox)
{
//
stateCount = DrawState(
pivot.state,
stateObjects,
drawTicksZone,
ignoreSwingHighs,
ignoreSwingLows,
ignoreSupportZones,
ignoreResistanceZones,
ignoreSupplyZones,
ignoreDemandZones,
ignoreBullishOrderBlocks,
ignoreBearishOrderBlocks,
ignoreBullishFairValueGaps,
ignoreBearishFairValueGaps,
ignoreBullishRejectionBars,
ignoreBearishRejectionBars,
ignoreBullishMomentumBars,
ignoreBearishMomentumBars //
);
}
else
{
//
double peakUpper = 0;
double peakLower = 0;
double valeUpper = 0;
double valeLower = 0;
//
datetime peakTo = NULL;
datetime valeTo = NULL;
datetime peakFrom = NULL;
datetime valeFrom = NULL;
//
bool hasBoxData = DetectPivotStateBoxData(
pivot,
peakUpper,
peakLower,
peakFrom,
peakTo,
valeUpper,
valeLower,
valeFrom,
valeTo //
);
//
if (hasBoxData)
{
//
XCBoxObject *peakBox;
bool isCreated = CreateBox(
peakBox,
peakUpper,
peakLower,
peakFrom,
peakTo,
clrMagenta,
1,
false,
STYLE_DASHDOT //
);
if (isCreated)
{
//
Add(
(XCBaseObject *)peakBox,
stateObjects //
);
}
//
XCBoxObject *valeBox;
isCreated = CreateBox(
valeBox,
valeUpper,
valeLower,
valeFrom,
valeTo,
clrAqua,
1,
false,
STYLE_DASHDOT //
);
if (isCreated)
{
//
Add(
(XCBaseObject *)valeBox,
stateObjects //
);
}
}
}
//
if (IsValidSize(stateCount))
@@ -4471,6 +4554,9 @@ class XCPOIDrawer : public XCBase
drawnObjects,
false // Doesn't Clean ...
);
//
ArrayFree(stateObjects);
}
//