add support back indicators usage ...
This commit is contained in:
@@ -2083,6 +2083,7 @@ class XCTwoBarZone : public XCZone
|
||||
* @param forDir: ENUM_X_DIRECTION member, Specified Action Direction ...
|
||||
* @param breakerBar: XOHCL instance Reference ...
|
||||
* @param breakerDir: ENUM_X_DIRECTION member ...
|
||||
* @param ignoreActivation: ignore Zone Activation and Used Start ...
|
||||
* @param forPeriod: ENUM_TIMEFRAMES member, Specified Rejection Period ...
|
||||
*
|
||||
* @return ( bool )
|
||||
@@ -2091,6 +2092,7 @@ class XCTwoBarZone : public XCZone
|
||||
ENUM_X_DIRECTION forDir,
|
||||
XOHCL &breakerBar,
|
||||
ENUM_X_DIRECTION &breakerDir,
|
||||
bool ignoreActivation = false,
|
||||
ENUM_TIMEFRAMES forPeriod = NULL //
|
||||
)
|
||||
{
|
||||
@@ -2117,22 +2119,60 @@ class XCTwoBarZone : public XCZone
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL activatedBar;
|
||||
ENUM_X_DIRECTION activatedDir;
|
||||
bool isActivated = IsActivated(
|
||||
forDir,
|
||||
activatedBar,
|
||||
activatedDir,
|
||||
forPeriod //
|
||||
);
|
||||
result = isActivated;
|
||||
bool isBullish = IsBullish(forDir);
|
||||
bool isBearish = IsBearish(forDir);
|
||||
int activatedIndex = -1;
|
||||
|
||||
//
|
||||
if (!ignoreActivation)
|
||||
{
|
||||
//
|
||||
XOHCL activatedBar;
|
||||
ENUM_X_DIRECTION activatedDir;
|
||||
bool isActivated = IsActivated(
|
||||
forDir,
|
||||
activatedBar,
|
||||
activatedDir,
|
||||
forPeriod //
|
||||
);
|
||||
result = isActivated;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
activatedIndex = activatedBar.Index();
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
XOHCL startedBar;
|
||||
ENUM_X_DIRECTION startedDir;
|
||||
bool isStarted = IsActivated(
|
||||
forDir,
|
||||
startedBar,
|
||||
startedDir,
|
||||
forPeriod //
|
||||
);
|
||||
result = isStarted;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
activatedIndex = startedBar.Index();
|
||||
}
|
||||
|
||||
//
|
||||
result = IsValidIndex(activatedIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int activatedIndex = activatedBar.Index();
|
||||
activatedIndex--;
|
||||
|
||||
//
|
||||
@@ -2164,16 +2204,30 @@ class XCTwoBarZone : public XCZone
|
||||
//
|
||||
bool isBreakedFromUpper =
|
||||
//
|
||||
(iPBar.high <= Upper() &&
|
||||
iBar.low > Upper())
|
||||
isBullish &&
|
||||
//
|
||||
(
|
||||
//
|
||||
iBar.low > Upper() ||
|
||||
(iBar.low <= Upper() &&
|
||||
iBar.high > Upper())
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isBreakedFromLower =
|
||||
//
|
||||
(iPBar.low >= Lower() &&
|
||||
iBar.low < Lower())
|
||||
isBearish &&
|
||||
//
|
||||
(
|
||||
//
|
||||
iBar.low < Lower() ||
|
||||
(iBar.high >= Lower() &&
|
||||
iBar.low < Lower())
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user