last ...
This commit is contained in:
@@ -1302,7 +1302,11 @@ class XC121SMCCycleHelper : public XCBase
|
|||||||
*/
|
*/
|
||||||
int DrawCycleState(
|
int DrawCycleState(
|
||||||
X121SMCCycleState &state,
|
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 ...
|
// Order Blocks ...
|
||||||
|
if (drawOrderBlocks)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Bullish ...
|
// Bullish ...
|
||||||
bool hasBullishOBs = state.HasBullishOBs();
|
bool hasBullishOBs = state.HasBullishOBs();
|
||||||
@@ -1370,10 +1375,12 @@ class XC121SMCCycleHelper : public XCBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fair Value Gaps ...
|
// Fair Value Gaps ...
|
||||||
|
if (drawFairValueGaps)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Bullish ...
|
// Bullish ...
|
||||||
bool hasBullishFVGs = state.HasBullishFVGs();
|
bool hasBullishFVGs = state.HasBullishFVGs();
|
||||||
@@ -1439,7 +1446,12 @@ class XC121SMCCycleHelper : public XCBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Support and Resistance Zones ...
|
||||||
|
if (drawSupportAndResistanceZones)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Support Zones ...
|
// Support Zones ...
|
||||||
bool hasSupportZones = state.HasSupportZones();
|
bool hasSupportZones = state.HasSupportZones();
|
||||||
@@ -1503,7 +1515,12 @@ class XC121SMCCycleHelper : public XCBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Supply and Demand Zones ...
|
||||||
|
if (drawSupplyAndDemandZones)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Demand Zones ...
|
// Demand Zones ...
|
||||||
bool hasDemandZones = state.HasDemandZones();
|
bool hasDemandZones = state.HasDemandZones();
|
||||||
@@ -1567,6 +1584,7 @@ class XC121SMCCycleHelper : public XCBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
result = ArraySize(drawnObjects);
|
result = ArraySize(drawnObjects);
|
||||||
|
|||||||
@@ -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(
|
bool DetectPriceInsideBox(
|
||||||
XBoxZone &box,
|
XBoxZone &box, // Price Inside Bo ...
|
||||||
X121Conditions &xConditions,
|
XCOrderBlock *&orderBlock, // Price Inside Order Block ...
|
||||||
X121SMCCycleState &state //
|
X121Conditions &xConditions, // X121Conditions for Validation ...
|
||||||
|
X121SMCCycleState &state // Cycle State ...
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -912,6 +923,12 @@ bool DetectPriceInsideBox(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (hasPriceInsideOB)
|
||||||
|
{
|
||||||
|
orderBlock = priceInsideOB;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
bool hasBullishFVGs = state.HasBullishFVGs();
|
bool hasBullishFVGs = state.HasBullishFVGs();
|
||||||
bool hasBearishFVGs = state.HasBearishFVGs();
|
bool hasBearishFVGs = state.HasBearishFVGs();
|
||||||
|
|||||||
@@ -691,18 +691,20 @@ bool DetectX121SMCXHKPVSignalSetup(
|
|||||||
|
|
||||||
//
|
//
|
||||||
XBoxZone priceBox;
|
XBoxZone priceBox;
|
||||||
bool hasBox = false;
|
bool hasPriceBox = false;
|
||||||
|
XCOrderBlock *priceOB = NULL;
|
||||||
if (hasState)
|
if (hasState)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
hasBox = DetectPriceInsideBox(
|
hasPriceBox = DetectPriceInsideBox(
|
||||||
priceBox,
|
priceBox,
|
||||||
|
priceOB,
|
||||||
decisionXConditions,
|
decisionXConditions,
|
||||||
conditions.state //
|
conditions.state //
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
if (hasBox)
|
if (hasPriceBox)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Here We Can Validate Box by Same Cycles Peaks and Vales ...
|
// 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);
|
bool isBullish = IsBullish(priceBox.dir);
|
||||||
color boxColor = isBullish ? clrYellow : clrOrange;
|
color boxColor = isBullish ? clrYellow : clrOrange;
|
||||||
|
|
||||||
//
|
//
|
||||||
XCBoxObject *iObj;
|
XCBoxObject *iObj;
|
||||||
bool isCreated = visionCycleHelper.mPOIDrawer.CreateBox(
|
bool isCreated = visionCycleHelper.mPOIDrawer.CreateBox(
|
||||||
@@ -743,6 +746,65 @@ bool DetectX121SMCXHKPVSignalSetup(
|
|||||||
drawnObjects //
|
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 //
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user