This commit is contained in:
2025-01-27 08:45:57 +03:30
parent 24d152b41d
commit d54fb854c9
3 changed files with 294 additions and 197 deletions
@@ -1302,7 +1302,11 @@ class XC121SMCCycleHelper : public XCBase
*/
int DrawCycleState(
X121SMCCycleState &state,
XCBaseObject *&drawnObjects[] //
XCBaseObject *&drawnObjects[],
bool drawOrderBlocks = true,
bool drawFairValueGaps = true,
bool drawSupplyAndDemandZones = false,
bool drawSupportAndResistanceZones = false //
)
{
//
@@ -1310,7 +1314,8 @@ class XC121SMCCycleHelper : public XCBase
//
// Order Blocks ...
if (drawOrderBlocks)
{
//
// Bullish ...
bool hasBullishOBs = state.HasBullishOBs();
@@ -1370,10 +1375,12 @@ class XC121SMCCycleHelper : public XCBase
}
}
}
}
//
// Fair Value Gaps ...
if (drawFairValueGaps)
{
//
// Bullish ...
bool hasBullishFVGs = state.HasBullishFVGs();
@@ -1439,7 +1446,12 @@ class XC121SMCCycleHelper : public XCBase
}
}
}
}
//
// Support and Resistance Zones ...
if (drawSupportAndResistanceZones)
{
//
// Support Zones ...
bool hasSupportZones = state.HasSupportZones();
@@ -1503,7 +1515,12 @@ class XC121SMCCycleHelper : public XCBase
}
}
}
}
//
// Supply and Demand Zones ...
if (drawSupplyAndDemandZones)
{
//
// Demand Zones ...
bool hasDemandZones = state.HasDemandZones();
@@ -1567,6 +1584,7 @@ class XC121SMCCycleHelper : public XCBase
}
}
}
}
//
result = ArraySize(drawnObjects);
+20 -3
View File
@@ -804,10 +804,21 @@ struct X121SMCCycleState
//
};
/**
* Detect Price inside Box ...
*
* @param box: XBoxZone instance Reference, Founded Price Inside Box ...
* @param orderBlock: XCOrderBlock pointer Reference, Founded Price Inside Order Block ...
* @param xConditions: X121Conditions instance Reference, provides Market Conditions ...
* @param state: X121SMCCycleState instance Reference ...
*
* @return ( bool )
*/
bool DetectPriceInsideBox(
XBoxZone &box,
X121Conditions &xConditions,
X121SMCCycleState &state //
XBoxZone &box, // Price Inside Bo ...
XCOrderBlock *&orderBlock, // Price Inside Order Block ...
X121Conditions &xConditions, // X121Conditions for Validation ...
X121SMCCycleState &state // Cycle State ...
)
{
//
@@ -912,6 +923,12 @@ bool DetectPriceInsideBox(
}
}
//
if (hasPriceInsideOB)
{
orderBlock = priceInsideOB;
}
//
bool hasBullishFVGs = state.HasBullishFVGs();
bool hasBearishFVGs = state.HasBearishFVGs();
@@ -691,18 +691,20 @@ bool DetectX121SMCXHKPVSignalSetup(
//
XBoxZone priceBox;
bool hasBox = false;
bool hasPriceBox = false;
XCOrderBlock *priceOB = NULL;
if (hasState)
{
//
hasBox = DetectPriceInsideBox(
hasPriceBox = DetectPriceInsideBox(
priceBox,
priceOB,
decisionXConditions,
conditions.state //
);
//
if (hasBox)
if (hasPriceBox)
{
//
// Here We Can Validate Box by Same Cycles Peaks and Vales ...
@@ -718,11 +720,12 @@ bool DetectX121SMCXHKPVSignalSetup(
);
//
if (hasBox)
if (hasPriceBox)
{
//
bool isBullish = IsBullish(priceBox.dir);
color boxColor = isBullish ? clrYellow : clrOrange;
//
XCBoxObject *iObj;
bool isCreated = visionCycleHelper.mPOIDrawer.CreateBox(
@@ -743,6 +746,65 @@ bool DetectX121SMCXHKPVSignalSetup(
drawnObjects //
);
}
//
XCBaseObject *priceOBObj = NULL;
if (isBullish)
{
//
XCBullishOrderBlockObject *iObj;
isCreated = visionCycleHelper
.mPOIDrawer
.CreateBullishOrderBlock(
priceOB,
iObj //
);
//
if (isCreated)
{
//
iObj.ZoneWidth(2);
iObj.ZoneColor(boxColor);
iObj.ZoneStyle(STYLE_SOLID);
//
priceOBObj = (XCBaseObject *)iObj;
}
}
else
{
//
XCBearishOrderBlockObject *iObj;
isCreated = visionCycleHelper
.mPOIDrawer
.CreateBearishOrderBlock(
priceOB,
iObj //
);
//
if (isCreated)
{
//
iObj.ZoneWidth(2);
iObj.ZoneColor(boxColor);
iObj.ZoneStyle(STYLE_SOLID);
//
priceOBObj = (XCBaseObject *)iObj;
}
}
//
if (isCreated)
{
//
Add(
priceOBObj,
drawnObjects //
);
}
}
//