last ...
This commit is contained in:
@@ -3836,15 +3836,47 @@ struct XConsolidationZone
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Consolidation Hounts ...
|
||||
bool isHountTop = cBar.high > upper &&
|
||||
cBar.low < upper &&
|
||||
cBar.GetUp() < upper;
|
||||
bool isHountBottom = cBar.low < lower &&
|
||||
cBar.high > lower &&
|
||||
cBar.GetDown() > lower;
|
||||
bool isHounted = isHountTop ||
|
||||
isHountBottom;
|
||||
if (isHounted)
|
||||
{
|
||||
//
|
||||
if (isHountTop)
|
||||
{
|
||||
upper = cBar.high;
|
||||
}
|
||||
|
||||
//
|
||||
if (isHountBottom)
|
||||
{
|
||||
lower = cBar.low;
|
||||
}
|
||||
|
||||
//
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Consolidation Breaks ...
|
||||
// Update Zone ...
|
||||
// Add it ...
|
||||
bool isBOSTop = cBar.high > upper;
|
||||
bool isBOSBottom = cBar.low < lower;
|
||||
bool hasBOS = isBOSTop ||
|
||||
isBOSBottom;
|
||||
if (!hasBOS)
|
||||
bool isBreakTop = (cBar.GetUp() > upper &&
|
||||
cBar.GetDown() < upper) ||
|
||||
(cBar.low > upper &&
|
||||
cBar.high > upper);
|
||||
bool isBreakBottom = (cBar.GetDown() < lower &&
|
||||
cBar.GetUp() > lower) ||
|
||||
(cBar.high < lower &&
|
||||
cBar.low < lower);
|
||||
bool isBreaked = isBreakTop ||
|
||||
isBreakBottom;
|
||||
if (!isBreaked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -3852,9 +3884,9 @@ struct XConsolidationZone
|
||||
//
|
||||
// Calculate Break Direction ...
|
||||
breakerBar = cBar;
|
||||
breakDirection = isBOSTop
|
||||
breakDirection = isBreakTop
|
||||
? X_DIRECTION_BULLISH
|
||||
: isBOSBottom
|
||||
: isBreakBottom
|
||||
? X_DIRECTION_BEARISH
|
||||
: X_DIRECTION_NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user