This commit is contained in:
2025-01-23 20:52:45 +03:30
parent aa3630bc82
commit 330c70088c
10 changed files with 3085 additions and 774 deletions
+69 -2
View File
@@ -200,7 +200,12 @@ struct X121XCHEConditions
bool isCheSwitchedToBearish;
//
// bool isCloseLower
bool isClosedOverCheMin;
bool isClosedOverCheMax;
//
bool isClosedUnderCheMin;
bool isClosedUnderCheMax;
//
// Constructor ...
@@ -274,7 +279,12 @@ struct X121XCHEConditions
isCheSwitchedToBearish = false;
//
// XDON ...
isClosedOverCheMin = false;
isClosedOverCheMax = false;
//
isClosedUnderCheMin = false;
isClosedUnderCheMax = false;
}
/**
@@ -359,6 +369,10 @@ struct X121XCHEConditions
ToString("isCheBearish", isCheBearish, ignoreFalseConditions, separator) +
ToString("isCheSwitchedToBullish", isCheSwitchedToBullish, ignoreFalseConditions, separator) +
ToString("isCheSwitchedToBearish", isCheSwitchedToBearish, ignoreFalseConditions, separator) +
ToString("isClosedOverCheMin", isClosedOverCheMin, ignoreFalseConditions, separator) +
ToString("isClosedOverCheMax", isClosedOverCheMax, ignoreFalseConditions, separator) +
ToString("isClosedUnderCheMin", isClosedUnderCheMin, ignoreFalseConditions, separator) +
ToString("isClosedUnderCheMax", isClosedUnderCheMax, ignoreFalseConditions, separator) +
//
""
//
@@ -1108,6 +1122,55 @@ class XCX121XCHEHelper : public XCBaseHelper
!isCheBullishPrev;
bool isCheSwitchedToBearish = isCheBearish &&
!isCheBearishPrev;
//
double ches[];
double prevCheLE1 = le1Buffer[pIDX];
double prevCheLE2 = le2Buffer[pIDX];
double prevCheSE1 = se1Buffer[pIDX];
double prevCheSE2 = se2Buffer[pIDX];
if (prevCheLE1 != EMPTY_VALUE)
{
//
Add(
prevCheLE1,
ches //
);
}
if (prevCheLE2 != EMPTY_VALUE)
{
//
Add(
prevCheLE2,
ches //
);
}
if (prevCheSE1 != EMPTY_VALUE)
{
//
Add(
prevCheSE1,
ches //
);
}
if (prevCheSE2 != EMPTY_VALUE)
{
//
Add(
prevCheSE2,
ches //
);
}
//
double cheMin = GetMin(ches);
double cheMax = GetMax(ches);
//
bool isClosedOverCheMin = cBar.close > cheMin;
bool isClosedOverCheMax = cBar.close > cheMax;
bool isClosedUnderCheMin = cBar.close < cheMin;
bool isClosedUnderCheMax = cBar.close < cheMax;
//
conditions.isChe1Bullish = isChe1Bullish;
@@ -1122,6 +1185,10 @@ class XCX121XCHEHelper : public XCBaseHelper
conditions.isCheBearish = isCheBearish;
conditions.isCheSwitchedToBullish = isCheSwitchedToBullish;
conditions.isCheSwitchedToBearish = isCheSwitchedToBearish;
conditions.isClosedOverCheMin = isClosedOverCheMin;
conditions.isClosedOverCheMax = isClosedOverCheMax;
conditions.isClosedUnderCheMin = isClosedUnderCheMin;
conditions.isClosedUnderCheMax = isClosedUnderCheMax;
//
return result;