implement senario 1 ...

This commit is contained in:
2025-03-09 05:31:53 +03:30
parent d14f07ba80
commit 5c6dfd8bdf
4 changed files with 924 additions and 86 deletions
@@ -453,6 +453,7 @@ class XC121SMCCycleHelper : public XCBase
return result;
}
//
bool GeneratePVBox(
XBoxZone &box,
int barIndex = 0 //
@@ -487,7 +488,9 @@ class XC121SMCCycleHelper : public XCBase
datetime valesSameFrom = NULL;
double vale = mX121Helper.xpvHelper.GetVale(index);
double prevVale = mX121Helper.xpvHelper.GetVale(index + 1);
bool startsByVale = vale == prevVale;
bool startsByVale =
!startsByPeak &&
vale == prevVale;
//
bool canBreak = false;
@@ -712,11 +715,33 @@ struct X121SMCStrategyConditionParser
//
bool isX3MaInsidePeaksGoldenZone;
bool isX3MaCrossedInsidePeaksGoldenZone;
//
bool isX3MaInsideValesGoldenZone;
bool isX3MaCrossedInsideValesGoldenZone;
//
bool isX3MaBullishStateOverPeaksGoldenZone;
bool isX3MaBearishStateOverPeaksGoldenZone;
bool isX3MaSwitchedToBullishStateOverPeaksGoldenZone;
bool isX3MaSwitchedToBearishStateOverPeaksGoldenZone;
//
bool isX3MaBullishOrderedOverPeaksGoldenZone;
bool isX3MaBearishOrderedOverPeaksGoldenZone;
bool isX3MaSwitchedToBullishOrderedOverPeaksGoldenZone;
bool isX3MaSwitchedToBearishOrderedOverPeaksGoldenZone;
//
bool isX3MaBullishStateUnderValesGoldenZone;
bool isX3MaBearishStateUnderValesGoldenZone;
bool isX3MaSwitchedToBullishStateUnderValesGoldenZone;
bool isX3MaSwitchedToBearishStateUnderValesGoldenZone;
//
bool isX3MaBullishOrderedUnderValesGoldenZone;
bool isX3MaBearishOrderedUnderValesGoldenZone;
bool isX3MaSwitchedToBullishOrderedUnderValesGoldenZone;
bool isX3MaSwitchedToBearishOrderedUnderValesGoldenZone;
//
// XVWAP ...
@@ -726,6 +751,36 @@ struct X121SMCStrategyConditionParser
bool isVWapFastOverPeaksGoldenZone;
bool isVWapFastCrossedOverPeaksGoldenZone;
//
bool isVWapInsidePeaksGoldenZone;
bool isVWapCrossedInsidePeaksGoldenZone;
bool isVWapInsideValesGoldenZone;
bool isVWapCrossedInsideValesGoldenZone;
//
bool isVWapBullishStateOverPeaksGoldenZone;
bool isVWapBearishStateOverPeaksGoldenZone;
bool isVWapSwitchedToBullishStateOverPeaksGoldenZone;
bool isVWapSwitchedToBearishStateOverPeaksGoldenZone;
//
bool isVWapBullishOrderedOverPeaksGoldenZone;
bool isVWapBearishOrderedOverPeaksGoldenZone;
bool isVWapSwitchedToBullishOrderedOverPeaksGoldenZone;
bool isVWapSwitchedToBearishOrderedOverPeaksGoldenZone;
//
bool isVWapBullishStateUnderValesGoldenZone;
bool isVWapBearishStateUnderValesGoldenZone;
bool isVWapSwitchedToBullishStateUnderValesGoldenZone;
bool isVWapSwitchedToBearishStateUnderValesGoldenZone;
//
bool isVWapBullishOrderedUnderValesGoldenZone;
bool isVWapBearishOrderedUnderValesGoldenZone;
bool isVWapSwitchedToBullishOrderedUnderValesGoldenZone;
bool isVWapSwitchedToBearishOrderedUnderValesGoldenZone;
//
// XHK ...
@@ -748,8 +803,49 @@ struct X121SMCStrategyConditionParser
bool isSMHKSwitchedToBullishUnderValesGoldenZone;
//
bool isXVwapMaOverPeaksGoldeZone;
bool isXVwapMaUnderValesGoldeZone;
// XATR ...
//
bool isAtrUpperOverPeaksGoldenZone;
bool isAtrLowerOverPeaksGoldenZone;
bool isAtrOverPeaksGoldenZone;
bool isAtrCrossedOverPeaksGoldenZone;
//
bool isAtrUpperUnderValesGoldenZone;
bool isAtrLowerUnderValesGoldenZone;
bool isAtrUnderValesGoldenZone;
bool isAtrCrossedUnderValesGoldenZone;
//
// XSTR ...
//
bool isStrBullishOverPeaksGoldenZone;
bool isStrBearishOverPeaksGoldenZone;
bool isStrSwitchedToBullishOverPeaksGoldenZone;
bool isStrSwitchedToBearishOverPeaksGoldenZone;
//
bool isStrBullishUnderValesGoldenZone;
bool isStrBearishUnderValesGoldenZone;
bool isStrSwitchedToBullishUnderValesGoldenZone;
bool isStrSwitchedToBearishUnderValesGoldenZone;
//
// XCHE ...
//
bool isCheBullishOverPeaksGoldenZone;
bool isCheBearishOverPeaksGoldenZone;
bool isCheSwitchedBullishOverPeaksGoldenZone;
bool isCheSwitchedBearishOverPeaksGoldenZone;
//
bool isCheBullishUnderValesGoldenZone;
bool isCheBearishUnderValesGoldenZone;
bool isCheSwitchedBullishUnderValesGoldenZone;
bool isCheSwitchedBearishUnderValesGoldenZone;
//
// Constructor ...
@@ -764,6 +860,9 @@ struct X121SMCStrategyConditionParser
//
void Clean()
{
//
// XSAR ...
//
isSarBullishOverPeaksGoldenZone = false;
isSarSwitchedToBullishOverPeaksGoldenZone = false;
@@ -774,6 +873,9 @@ struct X121SMCStrategyConditionParser
isSarBearishUnderValesGoldenZone = false;
isSarSwitchedToBearishUnderValesGoldenZone = false;
//
// X3MA ...
//
isX3MaFastUnderValesGoldenZone = false;
isX3MaFastCrossedUnderValesGoldenZone = false;
@@ -783,23 +885,87 @@ struct X121SMCStrategyConditionParser
//
isX3MaInsidePeaksGoldenZone = false;
isX3MaCrossedInsidePeaksGoldenZone = false;
//
isX3MaInsideValesGoldenZone = false;
isX3MaCrossedInsideValesGoldenZone = false;
//
isX3MaBullishStateOverPeaksGoldenZone = false;
isX3MaBearishStateOverPeaksGoldenZone = false;
isX3MaSwitchedToBullishStateOverPeaksGoldenZone = false;
isX3MaSwitchedToBearishStateOverPeaksGoldenZone = false;
//
isX3MaBullishOrderedOverPeaksGoldenZone = false;
isX3MaBearishOrderedOverPeaksGoldenZone = false;
isX3MaSwitchedToBullishOrderedOverPeaksGoldenZone = false;
isX3MaSwitchedToBearishOrderedOverPeaksGoldenZone = false;
//
isX3MaBullishStateUnderValesGoldenZone = false;
isX3MaBearishStateUnderValesGoldenZone = false;
isX3MaSwitchedToBullishStateUnderValesGoldenZone = false;
isX3MaSwitchedToBearishStateUnderValesGoldenZone = false;
//
isX3MaBullishOrderedUnderValesGoldenZone = false;
isX3MaBearishOrderedUnderValesGoldenZone = false;
isX3MaSwitchedToBullishOrderedUnderValesGoldenZone = false;
isX3MaSwitchedToBearishOrderedUnderValesGoldenZone = false;
//
// XVWAP ...
//
isVWapFastUnderValesGoldenZone = false;
isVWapFastCrossedUnderValesGoldenZone = false;
isVWapFastOverPeaksGoldenZone = false;
isVWapFastCrossedOverPeaksGoldenZone = false;
//
isVWapInsidePeaksGoldenZone = false;
isVWapCrossedInsidePeaksGoldenZone = false;
isVWapInsideValesGoldenZone = false;
isVWapCrossedInsideValesGoldenZone = false;
//
isVWapBullishStateOverPeaksGoldenZone = false;
isVWapBearishStateOverPeaksGoldenZone = false;
isVWapSwitchedToBullishStateOverPeaksGoldenZone = false;
isVWapSwitchedToBearishStateOverPeaksGoldenZone = false;
//
isVWapBullishOrderedOverPeaksGoldenZone = false;
isVWapBearishOrderedOverPeaksGoldenZone = false;
isVWapSwitchedToBullishOrderedOverPeaksGoldenZone = false;
isVWapSwitchedToBearishOrderedOverPeaksGoldenZone = false;
//
isVWapBullishStateUnderValesGoldenZone = false;
isVWapBearishStateUnderValesGoldenZone = false;
isVWapSwitchedToBullishStateUnderValesGoldenZone = false;
isVWapSwitchedToBearishStateUnderValesGoldenZone = false;
//
isVWapBullishOrderedUnderValesGoldenZone = false;
isVWapBearishOrderedUnderValesGoldenZone = false;
isVWapSwitchedToBullishOrderedUnderValesGoldenZone = false;
isVWapSwitchedToBearishOrderedUnderValesGoldenZone = false;
//
// XHK ...
//
// XRWHK ...
//
isRawHKBearishOverPeaksGoldenZone = false;
isRawHKSwitchedToBearishOverPeaksGoldenZone = false;
isRawHKBullishUnderValesGoldenZone = false;
isRawHKSwitchedToBullishUnderValesGoldenZone = false;
//
// XSMHK ...
//
isSMHKBearishOverPeaksGoldenZone = false;
isSMHKSwitchedToBearishOverPeaksGoldenZone = false;
@@ -807,8 +973,49 @@ struct X121SMCStrategyConditionParser
isSMHKSwitchedToBullishUnderValesGoldenZone = false;
//
isXVwapMaOverPeaksGoldeZone = false;
isXVwapMaUnderValesGoldeZone = false;
// XATR ...
//
isAtrUpperOverPeaksGoldenZone = false;
isAtrLowerOverPeaksGoldenZone = false;
isAtrOverPeaksGoldenZone = false;
isAtrCrossedOverPeaksGoldenZone = false;
//
isAtrUpperUnderValesGoldenZone = false;
isAtrLowerUnderValesGoldenZone = false;
isAtrUnderValesGoldenZone = false;
isAtrCrossedUnderValesGoldenZone = false;
//
// XSTR ...
//
isStrBullishOverPeaksGoldenZone = false;
isStrBearishOverPeaksGoldenZone = false;
isStrSwitchedToBullishOverPeaksGoldenZone = false;
isStrSwitchedToBearishOverPeaksGoldenZone = false;
//
isStrBullishUnderValesGoldenZone = false;
isStrBearishUnderValesGoldenZone = false;
isStrSwitchedToBullishUnderValesGoldenZone = false;
isStrSwitchedToBearishUnderValesGoldenZone = false;
//
// XCHE ...
//
isCheBullishOverPeaksGoldenZone = false;
isCheBearishOverPeaksGoldenZone = false;
isCheSwitchedBullishOverPeaksGoldenZone = false;
isCheSwitchedBearishOverPeaksGoldenZone = false;
//
isCheBullishUnderValesGoldenZone = false;
isCheBearishUnderValesGoldenZone = false;
isCheSwitchedBullishUnderValesGoldenZone = false;
isCheSwitchedBearishUnderValesGoldenZone = false;
//
ZeroMemory(this);
@@ -939,6 +1146,86 @@ struct X121SMCStrategyConditionParser
//
);
//
isX3MaBullishStateOverPeaksGoldenZone =
isX3MaInsidePeaksGoldenZone &&
conditions.isX3MaBullishState;
//
isX3MaBearishStateOverPeaksGoldenZone =
isX3MaInsidePeaksGoldenZone &&
conditions.isX3MaBearishState;
//
isX3MaSwitchedToBullishStateOverPeaksGoldenZone =
isX3MaInsidePeaksGoldenZone &&
conditions.isX3MaSwitchedToBullishState;
//
isX3MaSwitchedToBearishStateOverPeaksGoldenZone =
isX3MaInsidePeaksGoldenZone &&
conditions.isX3MaSwitchedToBearishState;
//
isX3MaBullishOrderedOverPeaksGoldenZone =
isX3MaInsidePeaksGoldenZone &&
conditions.isX3MaBullishOrdered;
//
isX3MaBearishOrderedOverPeaksGoldenZone =
isX3MaInsidePeaksGoldenZone &&
conditions.isX3MaBearishOrdered;
//
isX3MaSwitchedToBullishOrderedOverPeaksGoldenZone =
isX3MaInsidePeaksGoldenZone &&
conditions.isX3MaSwitchedToBullishOrdered;
//
isX3MaSwitchedToBearishOrderedOverPeaksGoldenZone =
isX3MaInsidePeaksGoldenZone &&
conditions.isX3MaSwitchedToBearishOrdered;
//
isX3MaBullishStateUnderValesGoldenZone =
isX3MaInsideValesGoldenZone &&
conditions.isX3MaBullishState;
//
isX3MaBearishStateUnderValesGoldenZone =
isX3MaInsideValesGoldenZone &&
conditions.isX3MaBearishState;
//
isX3MaSwitchedToBullishStateUnderValesGoldenZone =
isX3MaInsideValesGoldenZone &&
conditions.isX3MaSwitchedToBullishState;
//
isX3MaSwitchedToBearishStateUnderValesGoldenZone =
isX3MaInsideValesGoldenZone &&
conditions.isX3MaSwitchedToBearishState;
//
isX3MaBullishOrderedUnderValesGoldenZone =
isX3MaInsideValesGoldenZone &&
conditions.isX3MaBullishOrdered;
//
isX3MaBearishOrderedUnderValesGoldenZone =
isX3MaInsideValesGoldenZone &&
conditions.isX3MaBearishOrdered;
//
isX3MaSwitchedToBullishOrderedUnderValesGoldenZone =
isX3MaInsideValesGoldenZone &&
conditions.isX3MaSwitchedToBullishOrdered;
//
isX3MaSwitchedToBearishOrderedUnderValesGoldenZone =
isX3MaInsideValesGoldenZone &&
conditions.isX3MaSwitchedToBearishOrdered;
//
// XVWAP ...
@@ -960,6 +1247,134 @@ struct X121SMCStrategyConditionParser
isVWapFastOverPeaksGoldenZone &&
conditions.vwapFastBuffer[pIDX] <= conditions.peaksGoldenBuffer[pIDX];
//
isVWapInsidePeaksGoldenZone =
//
conditions.vwapMin < conditions.peaksBuffer[cIDX] &&
conditions.vwapMin > conditions.peaksGoldenBuffer[cIDX] &&
//
conditions.vwapMax < conditions.peaksBuffer[cIDX] &&
conditions.vwapMax > conditions.peaksGoldenBuffer[cIDX]
//
;
//
isVWapCrossedInsidePeaksGoldenZone =
isVWapInsidePeaksGoldenZone &&
!(
//
conditions.vwapMin < conditions.peaksBuffer[pIDX] &&
conditions.vwapMin > conditions.peaksGoldenBuffer[pIDX] &&
//
conditions.vwapMax < conditions.peaksBuffer[pIDX] &&
conditions.vwapMax > conditions.peaksGoldenBuffer[pIDX]
//
);
//
isVWapInsideValesGoldenZone =
//
conditions.vwapMin > conditions.valesBuffer[cIDX] &&
conditions.vwapMin < conditions.valesGoldenBuffer[cIDX] &&
//
conditions.vwapMax > conditions.valesBuffer[cIDX] &&
conditions.vwapMax < conditions.valesGoldenBuffer[cIDX]
//
;
//
isVWapCrossedInsideValesGoldenZone =
isVWapInsideValesGoldenZone &&
!(
//
conditions.vwapMin > conditions.valesBuffer[pIDX] &&
conditions.vwapMin < conditions.valesGoldenBuffer[pIDX] &&
//
conditions.vwapMax > conditions.valesBuffer[pIDX] &&
conditions.vwapMax < conditions.valesGoldenBuffer[pIDX]
//
);
//
isVWapBullishStateOverPeaksGoldenZone =
isVWapInsidePeaksGoldenZone &&
conditions.isVWapBullishState;
//
isVWapBearishStateOverPeaksGoldenZone =
isVWapInsidePeaksGoldenZone &&
conditions.isVWapBearishState;
//
isVWapSwitchedToBullishStateOverPeaksGoldenZone =
isVWapInsidePeaksGoldenZone &&
conditions.isVWapSwitchedToBullishState;
//
isVWapSwitchedToBearishStateOverPeaksGoldenZone =
isVWapInsidePeaksGoldenZone &&
conditions.isVWapSwitchedToBearishState;
//
isVWapBullishOrderedOverPeaksGoldenZone =
isVWapInsidePeaksGoldenZone &&
conditions.isVWapBullishOrdered;
//
isVWapBearishOrderedOverPeaksGoldenZone =
isVWapInsidePeaksGoldenZone &&
conditions.isVWapBearishOrdered;
//
isVWapSwitchedToBullishOrderedOverPeaksGoldenZone =
isVWapInsidePeaksGoldenZone &&
conditions.isVWapSwitchedToBullishOrdered;
//
isVWapSwitchedToBearishOrderedOverPeaksGoldenZone =
isVWapInsidePeaksGoldenZone &&
conditions.isVWapSwitchedToBearishOrdered;
//
isVWapBullishStateUnderValesGoldenZone =
isVWapInsideValesGoldenZone &&
conditions.isVWapBullishState;
//
isVWapBearishStateUnderValesGoldenZone =
isVWapInsideValesGoldenZone &&
conditions.isVWapBearishState;
//
isVWapSwitchedToBullishStateUnderValesGoldenZone =
isVWapInsideValesGoldenZone &&
conditions.isVWapSwitchedToBullishState;
//
isVWapSwitchedToBearishStateUnderValesGoldenZone =
isVWapInsideValesGoldenZone &&
conditions.isVWapSwitchedToBearishState;
//
isVWapBullishOrderedUnderValesGoldenZone =
isVWapInsideValesGoldenZone &&
conditions.isVWapBullishOrdered;
//
isVWapBearishOrderedUnderValesGoldenZone =
isVWapInsideValesGoldenZone &&
conditions.isVWapBearishOrdered;
//
isVWapSwitchedToBullishOrderedUnderValesGoldenZone =
isVWapInsideValesGoldenZone &&
conditions.isVWapSwitchedToBullishOrdered;
//
isVWapSwitchedToBearishOrderedUnderValesGoldenZone =
isVWapInsideValesGoldenZone &&
conditions.isVWapSwitchedToBearishOrdered;
//
// XHK ...
@@ -1010,41 +1425,185 @@ struct X121SMCStrategyConditionParser
conditions.xhkSMLowBuffer[cIDX] < conditions.valesGoldenBuffer[cIDX];
//
// COMBINED Conditions ...
// XATR ...
//
isXVwapMaOverPeaksGoldeZone =
//
(
//
(isX3MaFastOverPeaksGoldenZone &&
isVWapFastCrossedOverPeaksGoldenZone)
//
||
//
(isVWapFastOverPeaksGoldenZone &&
isX3MaFastCrossedOverPeaksGoldenZone)
//
)
//
;
isAtrUpperOverPeaksGoldenZone =
conditions.atrUpperBuffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.atrUpperBuffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isXVwapMaUnderValesGoldeZone =
//
(
isAtrLowerOverPeaksGoldenZone =
conditions.atrLowerBuffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.atrLowerBuffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isAtrOverPeaksGoldenZone =
isAtrUpperOverPeaksGoldenZone &&
isAtrLowerOverPeaksGoldenZone;
//
isAtrCrossedOverPeaksGoldenZone =
isAtrOverPeaksGoldenZone &&
!(
//
(isX3MaFastUnderValesGoldenZone &&
isVWapFastCrossedUnderValesGoldenZone)
conditions.atrUpperBuffer[pIDX] < conditions.peaksBuffer[pIDX] &&
conditions.atrUpperBuffer[pIDX] > conditions.peaksGoldenBuffer[pIDX]
//
||
&&
//
(isVWapFastUnderValesGoldenZone &&
isX3MaFastCrossedUnderValesGoldenZone)
conditions.atrLowerBuffer[pIDX] < conditions.peaksBuffer[pIDX] &&
conditions.atrLowerBuffer[pIDX] > conditions.peaksGoldenBuffer[pIDX]
//
)
//
;
);
//
isAtrUpperUnderValesGoldenZone =
conditions.atrUpperBuffer[cIDX] > conditions.valesBuffer[cIDX] &&
conditions.atrUpperBuffer[cIDX] < conditions.valesGoldenBuffer[cIDX];
//
isAtrLowerUnderValesGoldenZone =
conditions.atrLowerBuffer[cIDX] > conditions.valesBuffer[cIDX] &&
conditions.atrLowerBuffer[cIDX] < conditions.valesGoldenBuffer[cIDX];
//
isAtrUnderValesGoldenZone =
isAtrUpperUnderValesGoldenZone &&
isAtrLowerUnderValesGoldenZone;
//
isAtrCrossedUnderValesGoldenZone =
isAtrUnderValesGoldenZone &&
!(
//
conditions.atrUpperBuffer[pIDX] > conditions.valesBuffer[pIDX] &&
conditions.atrUpperBuffer[pIDX] < conditions.valesGoldenBuffer[pIDX]
//
&&
//
conditions.atrLowerBuffer[pIDX] > conditions.valesBuffer[pIDX] &&
conditions.atrLowerBuffer[pIDX] < conditions.valesGoldenBuffer[pIDX]
//
);
//
// XSTR ...
//
isStrBullishOverPeaksGoldenZone =
conditions.isStrBullish &&
conditions.strBuffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.strBuffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isStrBearishOverPeaksGoldenZone =
conditions.isStrBearish &&
conditions.strBuffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.strBuffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isStrSwitchedToBullishOverPeaksGoldenZone =
conditions.isStrSwitchedToBullish &&
conditions.strBuffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.strBuffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isStrSwitchedToBearishOverPeaksGoldenZone =
conditions.isStrSwitchedToBearish &&
conditions.strBuffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.strBuffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isStrBullishUnderValesGoldenZone =
conditions.isStrBullish &&
conditions.strBuffer[cIDX] > conditions.valesBuffer[cIDX] &&
conditions.strBuffer[cIDX] < conditions.valesGoldenBuffer[cIDX];
//
isStrBearishUnderValesGoldenZone =
conditions.isStrBearish &&
conditions.strBuffer[cIDX] > conditions.valesBuffer[cIDX] &&
conditions.strBuffer[cIDX] < conditions.valesGoldenBuffer[cIDX];
//
isStrSwitchedToBullishUnderValesGoldenZone =
conditions.isStrSwitchedToBullish &&
conditions.strBuffer[cIDX] > conditions.valesBuffer[cIDX] &&
conditions.strBuffer[cIDX] < conditions.valesGoldenBuffer[cIDX];
//
isStrSwitchedToBearishUnderValesGoldenZone =
conditions.isStrSwitchedToBearish &&
conditions.strBuffer[cIDX] > conditions.valesBuffer[cIDX] &&
conditions.strBuffer[cIDX] < conditions.valesGoldenBuffer[cIDX];
//
// XCHE ...
//
isCheBullishOverPeaksGoldenZone =
conditions.isCheBullish &&
conditions.le1Buffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.le1Buffer[cIDX] > conditions.peaksGoldenBuffer[cIDX] &&
conditions.le2Buffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.le2Buffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isCheBearishOverPeaksGoldenZone =
conditions.isCheSwitchedToBullish &&
conditions.se1Buffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.se1Buffer[cIDX] > conditions.peaksGoldenBuffer[cIDX] &&
conditions.se2Buffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.se2Buffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isCheSwitchedBullishOverPeaksGoldenZone =
conditions.isCheSwitchedToBullish &&
conditions.le1Buffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.le1Buffer[cIDX] > conditions.peaksGoldenBuffer[cIDX] &&
conditions.le2Buffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.le2Buffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isCheSwitchedBearishOverPeaksGoldenZone =
conditions.isCheSwitchedToBearish &&
conditions.se1Buffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.se1Buffer[cIDX] > conditions.peaksGoldenBuffer[cIDX] &&
conditions.se2Buffer[cIDX] < conditions.peaksBuffer[cIDX] &&
conditions.se2Buffer[cIDX] > conditions.peaksGoldenBuffer[cIDX];
//
isCheBullishUnderValesGoldenZone =
conditions.isCheBullish &&
conditions.cheMin > conditions.valesBuffer[cIDX] &&
conditions.cheMin < conditions.valesGoldenBuffer[cIDX] &&
conditions.cheMax > conditions.valesBuffer[cIDX] &&
conditions.cheMax < conditions.valesGoldenBuffer[cIDX];
//
isCheBearishUnderValesGoldenZone =
conditions.isCheBearish &&
conditions.cheMin > conditions.valesBuffer[cIDX] &&
conditions.cheMin < conditions.valesGoldenBuffer[cIDX] &&
conditions.cheMax > conditions.valesBuffer[cIDX] &&
conditions.cheMax < conditions.valesGoldenBuffer[cIDX];
//
isCheSwitchedBullishUnderValesGoldenZone =
conditions.isCheSwitchedToBullish &&
conditions.cheMin > conditions.valesBuffer[cIDX] &&
conditions.cheMin < conditions.valesGoldenBuffer[cIDX] &&
conditions.cheMax > conditions.valesBuffer[cIDX] &&
conditions.cheMax < conditions.valesGoldenBuffer[cIDX];
//
isCheSwitchedBearishUnderValesGoldenZone =
conditions.isCheSwitchedToBearish &&
conditions.cheMin > conditions.valesBuffer[cIDX] &&
conditions.cheMin < conditions.valesGoldenBuffer[cIDX] &&
conditions.cheMax > conditions.valesBuffer[cIDX] &&
conditions.cheMax < conditions.valesGoldenBuffer[cIDX];
}
//