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