complete and fix momentums ...
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user