This commit is contained in:
2025-06-09 21:51:45 +03:30
parent dc50f29932
commit 51d8c40c69
6 changed files with 5573 additions and 1878 deletions
@@ -2458,7 +2458,7 @@ class XCXCATBEAPOIDetector : public XCBase
has = HasInvalidPivots();
if (has)
{
ApplySortOnBoxes(invalidPivots);
SortBoxes(invalidPivots);
}
//
@@ -2469,7 +2469,7 @@ class XCXCATBEAPOIDetector : public XCBase
has = HasPeakPivots();
if (has)
{
ApplySortOnBoxes(peakPivots);
SortBoxes(peakPivots);
}
//
@@ -2477,7 +2477,7 @@ class XCXCATBEAPOIDetector : public XCBase
has = HasValePivots();
if (has)
{
ApplySortOnBoxes(valePivots);
SortBoxes(valePivots);
}
//
@@ -2485,7 +2485,7 @@ class XCXCATBEAPOIDetector : public XCBase
has = HasMTBullishPivots();
if (has)
{
ApplySortOnBoxes(mtBullishPivots);
SortBoxes(mtBullishPivots);
}
//
@@ -2493,7 +2493,7 @@ class XCXCATBEAPOIDetector : public XCBase
has = HasMTBearishPivots();
if (has)
{
ApplySortOnBoxes(mtBearishPivots);
SortBoxes(mtBearishPivots);
}
//
@@ -2501,7 +2501,7 @@ class XCXCATBEAPOIDetector : public XCBase
has = HasOBBullishPivots();
if (has)
{
ApplySortOnBoxes(obBullishPivots);
SortBoxes(obBullishPivots);
}
//
@@ -2509,70 +2509,10 @@ class XCXCATBEAPOIDetector : public XCBase
has = HasOBBearishPivots();
if (has)
{
ApplySortOnBoxes(obBearishPivots);
SortBoxes(obBearishPivots);
}
}
//
void ApplySortOnBoxes(
XBoxZone &items[] //
)
{
//
int idx = -1;
bool has = false;
//
has = HasChild(items);
if (!has)
{
return;
}
//
XBoxZone tmp[];
Copy(
items,
tmp //
);
Clean(items);
//
while (HasChild(tmp))
{
//
idx = GetOldest(tmp);
has = IsValidIndex(idx);
if (!has)
{
break;
}
//
XBoxZone iBox = tmp[idx];
ArrayRemove(
tmp,
idx,
1 //
);
//
AddRef(
iBox,
items //
);
}
//
CleanupArray(
items,
maxAllowedPivots //
);
//
Clean(tmp);
}
//
void ApplyValidationOnBoxes(
XBoxZone &items[],