last ...
This commit is contained in:
@@ -741,6 +741,34 @@ bool DetectXCAEAConditions(
|
|||||||
double pSwingHigh = conditions.swingHighBuffer[pIDX];
|
double pSwingHigh = conditions.swingHighBuffer[pIDX];
|
||||||
double p2SwingHigh = conditions.swingHighBuffer[p2IDX];
|
double p2SwingHigh = conditions.swingHighBuffer[p2IDX];
|
||||||
|
|
||||||
|
//
|
||||||
|
// TREND ...
|
||||||
|
double zTrend = conditions.trendBuffer[zIDX];
|
||||||
|
double cTrend = conditions.trendBuffer[cIDX];
|
||||||
|
double pTrend = conditions.trendBuffer[pIDX];
|
||||||
|
double p2Trend = conditions.trendBuffer[p2IDX];
|
||||||
|
|
||||||
|
//
|
||||||
|
// KI ...
|
||||||
|
double zKI = conditions.kiBuffer[zIDX];
|
||||||
|
double cKI = conditions.kiBuffer[cIDX];
|
||||||
|
double pKI = conditions.kiBuffer[pIDX];
|
||||||
|
double p2KI = conditions.kiBuffer[p2IDX];
|
||||||
|
|
||||||
|
//
|
||||||
|
// TKI ...
|
||||||
|
double zTKI = conditions.tkiBuffer[zIDX];
|
||||||
|
double cTKI = conditions.tkiBuffer[cIDX];
|
||||||
|
double pTKI = conditions.tkiBuffer[pIDX];
|
||||||
|
double p2TKI = conditions.tkiBuffer[p2IDX];
|
||||||
|
|
||||||
|
//
|
||||||
|
// VIDYA ...
|
||||||
|
double zVIDYA = conditions.vidyaBuffer[zIDX];
|
||||||
|
double cVIDYA = conditions.vidyaBuffer[cIDX];
|
||||||
|
double pVIDYA = conditions.vidyaBuffer[pIDX];
|
||||||
|
double p2VIDYA = conditions.vidyaBuffer[p2IDX];
|
||||||
|
|
||||||
//
|
//
|
||||||
// X3MA ...
|
// X3MA ...
|
||||||
|
|
||||||
@@ -797,6 +825,58 @@ bool DetectXCAEAConditions(
|
|||||||
double x3maBearishGapUpper = c3MASlow;
|
double x3maBearishGapUpper = c3MASlow;
|
||||||
double x3maBearishGapLower = c3MAMedium;
|
double x3maBearishGapLower = c3MAMedium;
|
||||||
|
|
||||||
|
//
|
||||||
|
double cTrendValues[7] = {
|
||||||
|
cKI,
|
||||||
|
cTKI,
|
||||||
|
cTrend,
|
||||||
|
cVIDYA,
|
||||||
|
c3MAFast,
|
||||||
|
c3MASlow,
|
||||||
|
c3MAMedium,
|
||||||
|
};
|
||||||
|
double pTrendValues[7] = {
|
||||||
|
pKI,
|
||||||
|
pTKI,
|
||||||
|
pTrend,
|
||||||
|
pVIDYA,
|
||||||
|
p3MAFast,
|
||||||
|
p3MASlow,
|
||||||
|
p3MAMedium,
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
double minCTrendValue = GetMin(cTrendValues);
|
||||||
|
double maxCTrendValue = GetMax(cTrendValues);
|
||||||
|
|
||||||
|
//
|
||||||
|
double minPTrendValue = GetMin(pTrendValues);
|
||||||
|
double maxPTrendValue = GetMax(pTrendValues);
|
||||||
|
|
||||||
|
//
|
||||||
|
double cTrendValuesRange = (maxCTrendValue - minCTrendValue);
|
||||||
|
double cTrendValuesRangePoint = (cTrendValuesRange / points);
|
||||||
|
|
||||||
|
//
|
||||||
|
double pTrendValuesRange = (maxPTrendValue - minPTrendValue);
|
||||||
|
double pTrendValuesRangePoint = (pTrendValuesRange / points);
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isLowOverMax = cBar.low > maxCTrendValue;
|
||||||
|
bool isHighUnderMin = cBar.high < minCTrendValue;
|
||||||
|
bool isCloseOverMax = cBar.close > maxCTrendValue;
|
||||||
|
bool isCloseUnderMin = cBar.close < minCTrendValue;
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isCTrendRangeValid = cTrendValuesRangePoint <= 50;
|
||||||
|
bool isPTrendRangeValid = pTrendValuesRangePoint <= 50;
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isTrendRangeSwitchedToValid = isCTrendRangeValid &&
|
||||||
|
!isPTrendRangeValid;
|
||||||
|
bool isTrendRangeFinishedFromValid = !isCTrendRangeValid &&
|
||||||
|
isPTrendRangeValid;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create Conditions ...
|
// Create Conditions ...
|
||||||
|
|
||||||
@@ -928,7 +1008,7 @@ bool DetectXCAEAConditions(
|
|||||||
//
|
//
|
||||||
bool isCond1Bullish =
|
bool isCond1Bullish =
|
||||||
//
|
//
|
||||||
// false && // TODO: Remove this ...
|
false && // TODO: Remove this ...
|
||||||
isVolumeOverAvg &&
|
isVolumeOverAvg &&
|
||||||
isVolumeOverLast &&
|
isVolumeOverLast &&
|
||||||
conditions.isSarBullish &&
|
conditions.isSarBullish &&
|
||||||
@@ -941,7 +1021,7 @@ bool DetectXCAEAConditions(
|
|||||||
//
|
//
|
||||||
bool isCond1Bearish =
|
bool isCond1Bearish =
|
||||||
//
|
//
|
||||||
// false && // TODO: Remove this ...
|
false && // TODO: Remove this ...
|
||||||
isVolumeOverAvg &&
|
isVolumeOverAvg &&
|
||||||
isVolumeOverLast &&
|
isVolumeOverLast &&
|
||||||
conditions.isSarBearish &&
|
conditions.isSarBearish &&
|
||||||
@@ -977,12 +1057,17 @@ bool DetectXCAEAConditions(
|
|||||||
//
|
//
|
||||||
// false &&
|
// false &&
|
||||||
//
|
//
|
||||||
|
isVolumeOverAvg &&
|
||||||
|
isVolumeBullish &&
|
||||||
|
isVolumeOverLast &&
|
||||||
c3MASlowState > 0 &&
|
c3MASlowState > 0 &&
|
||||||
c3MAMediumState > 0 &&
|
c3MAMediumState > 0 &&
|
||||||
cBar.GetUp() > pSar &&
|
cBar.GetUp() > pSar &&
|
||||||
conditions.isFastOverSlow &&
|
conditions.isFastOverSlow &&
|
||||||
conditions.isVidyaBullish &&
|
conditions.isVidyaBullish &&
|
||||||
conditions.isFastOverMedium &&
|
conditions.isFastOverMedium &&
|
||||||
|
isTrendRangeFinishedFromValid &&
|
||||||
|
conditions.isSwingHighOverLast &&
|
||||||
conditions.isSarSwitchedToBullish
|
conditions.isSarSwitchedToBullish
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -1214,6 +1299,8 @@ bool DetectXCAEAConditions(
|
|||||||
p2Bar.Clean();
|
p2Bar.Clean();
|
||||||
p3Bar.Clean();
|
p3Bar.Clean();
|
||||||
p4Bar.Clean();
|
p4Bar.Clean();
|
||||||
|
Clean(cTrendValues);
|
||||||
|
Clean(pTrendValues);
|
||||||
Clean(insidePivots);
|
Clean(insidePivots);
|
||||||
pConditions.Clean();
|
pConditions.Clean();
|
||||||
rejectedPivot.Clean();
|
rejectedPivot.Clean();
|
||||||
|
|||||||
Reference in New Issue
Block a user