last ...
This commit is contained in:
@@ -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[],
|
||||
|
||||
Reference in New Issue
Block a user