This commit is contained in:
2026-02-12 18:01:52 +03:30
parent da2ca0e1ad
commit 7a26df1194
4 changed files with 209 additions and 2 deletions
@@ -227,6 +227,17 @@ class XCMarketPatternDetector : public XCBase
return result;
}
/**
* Check a Bar has Same Sequence Directionalo Bar or Not ...
*
* @param bar: XOHCL, Specified Bar ...
* @param dir: ENUM_X_DIRECTION, Detected Bars Direction ...
* @param count: int, Number of Same Bars ...
* @param validation: int, Validation of Same Bars ...
* @param loopback: int, Loopback for Detection ...
*
* @return ( bool )
*/
bool HasSameBars(
XOHCL &bar,
ENUM_X_DIRECTION &dir,
@@ -252,12 +263,34 @@ class XCMarketPatternDetector : public XCBase
return result;
}
//
XOHCL tmpBar;
bar.GetPreviousBar(tmpBar);
while (tmpBar.GetDirection() == bar.GetDirection())
{
//
count++;
tmpBar.GetPreviousBar(tmpBar);
}
//
// Validate Count ...
result = count >= validation;
if (result)
{
dir = bar.GetDirection();
}
//
result =
result &&
count > 0 &&
HasDirection(dir) &&
count >= validation;
//
tmpBar.Clean();
//
return result;
}