Add support for Golden Zone inside XPV indicator and it's Helper ...

This commit is contained in:
2025-03-08 22:00:36 +03:30
parent e0e081628a
commit 3b7ce3816a
9 changed files with 682 additions and 132 deletions
@@ -282,29 +282,30 @@ class XCX121SMCXWZSignalDetector : public XCBase
// Detect Signal Box ...
//
// TODO: Check This ...
// bool isZoneActivated =
// hasWorkingZone &&
// hasWaitingZones &&
// workingZone.IsZoneActivated(
// activatedZoneIDX,
// activatedFVGIDX,
// provider,
// zIndex //
// );
//
hasSignalBox =
bool isZoneActivated =
hasWorkingZone &&
hasWaitingBoxes &&
workingZone.IsBoxActivated(
signalBox,
hasWaitingZones &&
workingZone.IsZoneActivated(
activatedZoneIDX,
activatedFVGIDX,
signalBoxDir,
signalProvider,
provider,
zIndex //
);
//
// hasSignalBox =
// hasWorkingZone &&
// hasWaitingBoxes &&
// workingZone.IsBoxActivated(
// signalBox,
// signalBoxDir,
// signalProvider,
// provider,
// zIndex //
// );
//
if (hasSignalBox)
{
+86 -79
View File
@@ -470,8 +470,7 @@ struct X121SMCStrategyXWZWorkingZone
//
// Detect OB FVG ...
if (false &&
hasNewOrderBlock)
if (hasNewOrderBlock)
{
//
XOHCL obStartedBar;
@@ -483,8 +482,7 @@ struct X121SMCStrategyXWZWorkingZone
);
//
has = isOBStarted &&
isOBStartedBodyOut;
has = isOBStarted;
if (has)
{
//
@@ -534,21 +532,21 @@ struct X121SMCStrategyXWZWorkingZone
ob //
)
//
||
//
(isBullish
? IsAboveDiff(
iFVG,
ob,
true // Ignore Inside ...
)
: IsBelowDiff(
iFVG,
ob,
true // Ignore Inside ...
)
//
)
// ||
// //
// (isBullish
// ? IsAboveDiff(
// iFVG,
// ob,
// true // Ignore Inside ...
// )
// : IsBelowDiff(
// iFVG,
// ob,
// true // Ignore Inside ...
// )
// //
// )
//
;
@@ -611,86 +609,91 @@ struct X121SMCStrategyXWZWorkingZone
//
//
// Check New Order Block Detection Analyse ...
XBoxZone analyseOBBox;
XCOrderBlock *analyseOB = NULL;
bool hasNewAnalyseOrderBlock =
Contains(
X_BULLISH_ORDERBLOCK_DETECTED,
provider
.analysePoiEvents //
) ||
Contains(
X_BEARISH_ORDERBLOCK_DETECTED,
provider
.analysePoiEvents //
);
if (hasNewAnalyseOrderBlock)
bool lookingOthers = false;
if (lookingOthers)
{
//
idx = GetYoungest(provider
.analyseState
.orderBlocks //
);
has = IsValidIndex(idx);
if (has)
// Check New Order Block Detection Analyse ...
XBoxZone analyseOBBox;
XCOrderBlock *analyseOB = NULL;
bool hasNewAnalyseOrderBlock =
Contains(
X_BULLISH_ORDERBLOCK_DETECTED,
provider
.analysePoiEvents //
) ||
Contains(
X_BEARISH_ORDERBLOCK_DETECTED,
provider
.analysePoiEvents //
);
if (hasNewAnalyseOrderBlock)
{
//
analyseOB = provider
.analyseState
.orderBlocks[idx];
has = ToBox(
analyseOBBox,
analyseOB //
idx = GetYoungest(provider
.analyseState
.orderBlocks //
);
has = IsValidIndex(idx);
if (has)
{
//
analyseOB.To(cTime);
analyseOBBox.to = cTime;
hasNewAnalyseOrderBlock = analyseOBBox.IsValid();
analyseOB = provider
.analyseState
.orderBlocks[idx];
has = ToBox(
analyseOBBox,
analyseOB //
);
if (has)
{
//
analyseOB.To(cTime);
analyseOBBox.to = cTime;
hasNewAnalyseOrderBlock = analyseOBBox.IsValid();
}
}
}
}
//
// Checking Analyse Order Block ...
if (hasNewAnalyseOrderBlock)
{
//
XOHCL obStartedBar;
bool isOBStartedBodyOut = false;
bool isOBStarted = analyseOB.IsStarted(
analyseOB.GetDirection(),
obStartedBar,
isOBStartedBodyOut //
);
//
has = isOBStarted &&
isOBStartedBodyOut;
if (has)
// Checking Analyse Order Block ...
if (hasNewAnalyseOrderBlock)
{
//
analyseOBBox.from =
obStartedBar.NextAt();
XOHCL obStartedBar;
bool isOBStartedBodyOut = false;
bool isOBStarted = analyseOB.IsStarted(
analyseOB.GetDirection(),
obStartedBar,
isOBStartedBodyOut //
);
//
has = IsExists(analyseOBBox);
if (!has)
has = isOBStarted &&
isOBStartedBodyOut;
if (has)
{
//
AddRef(
analyseOBBox,
waitingBoxes //
);
analyseOBBox.from =
obStartedBar.NextAt();
//
has = IsExists(analyseOBBox);
if (!has)
{
//
AddRef(
analyseOBBox,
waitingBoxes //
);
}
}
}
}
//
analyseOBBox.Clean();
ZeroMemory(analyseOB);
//
analyseOBBox.Clean();
ZeroMemory(analyseOB);
}
//
//
@@ -1051,10 +1054,14 @@ struct X121SMCStrategyXWZWorkingZone
//
// Combine Result ...
result = isPVPassed;
// result = isPVPassed;
// || isPVPassed
// || isPV50Passed
// || isRejected;
//
result = isPVPassed;
if (result)
{
//