This commit is contained in:
2025-03-06 05:34:36 +03:30
parent 5160ea1c82
commit ee3eaa2396
3 changed files with 211 additions and 1 deletions
@@ -406,6 +406,13 @@ class XCX121SMCXWZSignalDetector : public XCBase
analyseState,
consolidationState //
);
if (hasWaitingZones)
{
//
// Validate Waiting Zones ...
workingZone.ValidateWaitingZones(zIndex);
hasWaitingZones = HasChild(workingZone.waitingZones);
}
//
// Checking Working Zone Destory or not ...
@@ -605,6 +605,83 @@ struct X121SMCStrategyXWZWorkingZone
return result;
}
//
int ValidateWaitingZones(
int barIndex = 0 //
)
{
//
int result = 0;
//
bool has = false;
//
if (barIndex < 0)
{
barIndex = 0;
}
//
has = IsValid() &&
HasWaitingZones();
if (!has)
{
return result;
}
//
int removeIDX[];
result = CountWaitingZones();
for (int i = 0; i < result; i++)
{
//
XOBFVG iOBFVG = waitingZones[i];
//
XOHCL iInvalidBar;
has = iOBFVG.IsValidZone(
iInvalidBar,
barIndex //
);
if (!has)
{
//
Add(
i,
removeIDX //
);
//
AddRef(
iOBFVG,
unavailableZones //
);
}
//
iInvalidBar.Clean();
}
//
has = HasChild(removeIDX);
if (has)
{
//
CleanupArray(
removeIDX,
waitingZones //
);
}
Clean(removeIDX);
//
result = CountWaitingZones();
//
return result;
}
//
bool IsZoneRejected(
XOBFVG &zone,