This commit is contained in:
2025-03-20 04:54:46 +03:30
parent 012499cc73
commit 1f8d75f9b4
12 changed files with 285 additions and 129 deletions
+82 -30
View File
@@ -32,6 +32,7 @@ enum ENUM_X121SMC_XWZ_PROVIDERS
{
X121SMC_XWZ_PROVIDER_NONE,
X121SMC_XWZ_PROVIDER_XHKMA,
X121SMC_XWZ_PROVIDER_XREJECTED_BOX,
};
//
@@ -466,7 +467,7 @@ struct X121SMCStrategyXWZWorkingZone
*
* @return ( bool )
*/
bool DetectSignalBoxes(
bool DetectWaitingBoxes(
ENUM_X_CYCLES cycle,
X121SMCStrategySignalProviderData &provider,
int barIndex = 0 //
@@ -524,46 +525,91 @@ struct X121SMCStrategyXWZWorkingZone
if (has)
{
//
XCFVG *iFVG = NULL;
XCOrderBlock *iOB = cState.orderBlocks[idx];
bool isBullish = iOB.IsBullish();
//
// Detecting Inside FVG ...
has = cState.HasFairValueGaps();
if (has)
{
//
XCFVG *tmpFVGs[];
count = cState.CountFairValueGaps();
for (int i = 0; i < count; i++)
{
//
XCFVG *jFVG = cState.fairValueGaps[i];
//
bool isDirPassed = jFVG.GetDirection() == iOB.GetDirection();
bool isFromPassed = jFVG.From() >= iOB.From();
bool isPlacePassed = IsInsideOrDiff(
jFVG,
iOB,
false //
);
//
has = isDirPassed &&
isFromPassed &&
isPlacePassed;
if (has)
{
//
Add(
jFVG,
tmpFVGs //
);
}
//
ZeroMemory(jFVG);
}
//
// Selecting iFVG Based on Direction of OB ...
has = HasChild(tmpFVGs);
if (has)
{
//
idx =
isBullish
? GetLowest(tmpFVGs)
: GetHighest(tmpFVGs);
has = IsValidIndex(idx);
if (has)
{
iFVG = tmpFVGs[idx];
}
}
//
Clean(tmpFVGs);
}
//
XBoxZone iOBBox;
XBoxZone iFVGBox;
if (iFVG != NULL)
{
//
has = ToBox(
iFVGBox,
iFVG //
);
}
//
has = ToBox(
iOBBox,
iOB //
);
if (has)
{
//
// Detect FVGs ...
if (cStateEvents.hasNewFairValueGap)
{
//
int idx =
isBullish
? GetLowest(cState.bullishFairValueGaps)
: GetHighest(cState.bearishFairValueGaps);
XCFVG *iFVG =
isBullish
? cState.bullishFairValueGaps[idx]
: cState.bearishFairValueGaps[idx];
has = IsValidIndex(idx);
if (has)
{
//
ToBox(
iFVGBox,
iFVG //
);
}
}
}
//
has = iOBBox.IsValid() &&
iFVGBox.IsValid();
has = iOBBox.IsValid();
if (has)
{
//
@@ -586,6 +632,8 @@ struct X121SMCStrategyXWZWorkingZone
//
iOBBox.Clean();
iFVGBox.Clean();
ZeroMemory(iOB);
ZeroMemory(iFVG);
}
}
@@ -1099,7 +1147,7 @@ struct X121SMCStrategyXWZWorkingZone
//
if (isSenario1Happend)
{
signalProvider = X121SMC_XWZ_PROVIDER_XHKMA;
signalProvider = X121SMC_XWZ_PROVIDER_XREJECTED_BOX;
}
}
@@ -1661,6 +1709,10 @@ struct X121SMCStrategyXWZWorkingZone
);
if (has)
{
//
iFVGBoxObj.BoxStyle(STYLE_SOLID);
//
mDrawnObjects.Add(iFVGBoxObj);
}