last ...
This commit is contained in:
@@ -55,6 +55,8 @@ struct X121SMCStrategyXHKPVSignalConditions
|
|||||||
double point;
|
double point;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
XBoxZone priceBox;
|
||||||
|
XCOrderBlock *priceOB;
|
||||||
X121SMCCycleState state;
|
X121SMCCycleState state;
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -177,6 +179,8 @@ struct X121SMCStrategyXHKPVSignalConditions
|
|||||||
|
|
||||||
//
|
//
|
||||||
state.Clean();
|
state.Clean();
|
||||||
|
priceOB = NULL;
|
||||||
|
priceBox.Clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -687,27 +691,69 @@ bool DetectX121SMCXHKPVSignalSetup(
|
|||||||
// Detect Cycle State ...
|
// Detect Cycle State ...
|
||||||
|
|
||||||
//
|
//
|
||||||
|
bool hasPriceBox = conditions.priceBox.IsValid();
|
||||||
bool hasState = visionCycleHelper.GetCycleState(conditions.state);
|
bool hasState = visionCycleHelper.GetCycleState(conditions.state);
|
||||||
|
|
||||||
//
|
//
|
||||||
XBoxZone priceBox;
|
// Detect Price Box if not Provided ...
|
||||||
bool hasPriceBox = false;
|
if (hasState &&
|
||||||
XCOrderBlock *priceOB = NULL;
|
!hasPriceBox)
|
||||||
if (hasState)
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
hasPriceBox = DetectPriceInsideBox(
|
hasPriceBox = DetectPriceInsideBox(
|
||||||
priceBox,
|
conditions.priceBox,
|
||||||
priceOB,
|
conditions.priceOB,
|
||||||
decisionXConditions,
|
decisionXConditions,
|
||||||
conditions.state //
|
conditions.state //
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if (hasPriceBox)
|
if (hasPriceBox)
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
// Update Price Box Date ...
|
||||||
|
conditions.priceOB.To(cTime);
|
||||||
|
conditions.priceBox.to = cTime;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Here We Can Validate Box by Same Cycles Peaks and Vales ...
|
// Here We Can Validate Box by Same Cycles Peaks and Vales ...
|
||||||
|
bool isBullish = IsBullish(conditions.priceBox.dir);
|
||||||
|
|
||||||
|
//
|
||||||
|
int cIDX = 1;
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isSameCyclePeaks =
|
||||||
|
//
|
||||||
|
triggerXConditions.peaksBuffer[cIDX] == decisionXConditions.peaksBuffer[cIDX] &&
|
||||||
|
decisionXConditions.peaksBuffer[cIDX] == analyseXConditions.peaksBuffer[cIDX] &&
|
||||||
|
analyseXConditions.peaksBuffer[cIDX] == verificationXConditions.peaksBuffer[cIDX]
|
||||||
|
//
|
||||||
|
;
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isSameCycleVales =
|
||||||
|
//
|
||||||
|
triggerXConditions.valesBuffer[cIDX] == decisionXConditions.valesBuffer[cIDX] &&
|
||||||
|
decisionXConditions.valesBuffer[cIDX] == analyseXConditions.valesBuffer[cIDX] &&
|
||||||
|
analyseXConditions.valesBuffer[cIDX] == verificationXConditions.valesBuffer[cIDX]
|
||||||
|
//
|
||||||
|
;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Validation Conditions ...
|
||||||
|
bool isPriceOBValid =
|
||||||
|
//
|
||||||
|
hasPriceBox &&
|
||||||
|
(isBullish
|
||||||
|
? isSameCycleVales
|
||||||
|
: isSameCyclePeaks)
|
||||||
|
//
|
||||||
|
;
|
||||||
|
if (isPriceOBValid)
|
||||||
|
{
|
||||||
|
Print("Valid Conditions ...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,13 +769,13 @@ bool DetectX121SMCXHKPVSignalSetup(
|
|||||||
if (hasPriceBox)
|
if (hasPriceBox)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
bool isBullish = IsBullish(priceBox.dir);
|
bool isBullish = IsBullish(conditions.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(
|
||||||
priceBox,
|
conditions.priceBox,
|
||||||
iObj,
|
iObj,
|
||||||
boxColor,
|
boxColor,
|
||||||
1,
|
1,
|
||||||
@@ -756,7 +802,7 @@ bool DetectX121SMCXHKPVSignalSetup(
|
|||||||
isCreated = visionCycleHelper
|
isCreated = visionCycleHelper
|
||||||
.mPOIDrawer
|
.mPOIDrawer
|
||||||
.CreateBullishOrderBlock(
|
.CreateBullishOrderBlock(
|
||||||
priceOB,
|
conditions.priceOB,
|
||||||
iObj //
|
iObj //
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -779,7 +825,7 @@ bool DetectX121SMCXHKPVSignalSetup(
|
|||||||
isCreated = visionCycleHelper
|
isCreated = visionCycleHelper
|
||||||
.mPOIDrawer
|
.mPOIDrawer
|
||||||
.CreateBearishOrderBlock(
|
.CreateBearishOrderBlock(
|
||||||
priceOB,
|
conditions.priceOB,
|
||||||
iObj //
|
iObj //
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1231,8 +1231,8 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
|||||||
x121Inputs.xhkInputs.xhkIgnoreSmoothingShadows = true;
|
x121Inputs.xhkInputs.xhkIgnoreSmoothingShadows = true;
|
||||||
|
|
||||||
//
|
//
|
||||||
x121Inputs.xhkInputs.drawRawXHKCandles = showAll || true;
|
x121Inputs.xhkInputs.drawRawXHKCandles = showAll || false;
|
||||||
x121Inputs.xhkInputs.drawSmoothedXHKCandles = showAll || true;
|
x121Inputs.xhkInputs.drawSmoothedXHKCandles = showAll || false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// XATR ...
|
// XATR ...
|
||||||
|
|||||||
Reference in New Issue
Block a user