complete and fix momentums ...

This commit is contained in:
2025-03-17 13:22:16 +03:30
parent a1f3289bb6
commit ad3b0ae4ac
4 changed files with 72 additions and 34 deletions
+21 -14
View File
@@ -2099,13 +2099,12 @@ class XCBarAnalyser : public XCBase
}
//
// Check Bar Must Engulfed ...
result = IsEngulfed(
bar,
dir //
);
XOHCL pBar;
result = bar.GetPreviousBar(pBar);
if (!result)
{
//
pBar.Clean();
return result;
}
@@ -2131,24 +2130,32 @@ class XCBarAnalyser : public XCBase
IsValidIndex(hhIDX);
if (!result)
{
//
pBar.Clean();
return result;
}
//
// TODO: Fix Momentum Extends and Also Rejection ...
double llhhDiff = MathAbs(hh - ll);
//
bool isBullish =
bar.low > ll &&
IsBullish(dir) &&
bar.close >= hh;
bar.close >= hh &&
bar.IsBullish() &&
bar.low > pBar.low &&
bar.high > pBar.high &&
bar.GetBody() > pBar.GetBody() &&
bar.GetRange() > pBar.GetRange() &&
bar.GetShadows() < pBar.GetShadows();
//
bool isBearish =
bar.high < hh &&
IsBearish(dir) &&
bar.close <= ll;
bar.close <= ll &&
bar.IsBearish() &&
bar.low < pBar.low &&
bar.high < pBar.high &&
bar.GetBody() > pBar.GetBody() &&
bar.GetRange() > pBar.GetRange() &&
bar.GetShadows() < pBar.GetShadows();
//
result = isBullish ||
@@ -2163,7 +2170,7 @@ class XCBarAnalyser : public XCBase
}
//
// Cleanup Resources ...
pBar.Clean();
//
return result;