last ...
This commit is contained in:
@@ -167,6 +167,7 @@ struct X121Conditions
|
||||
double lLLBuffer[];
|
||||
double hHHBuffer[];
|
||||
double hLLBuffer[];
|
||||
long volumeBuffer[];
|
||||
double peaksBuffer[];
|
||||
double valesBuffer[];
|
||||
double strUpBuffer[];
|
||||
@@ -198,6 +199,10 @@ struct X121Conditions
|
||||
double donCloseUpperBuffer[];
|
||||
double donCloseLowerBuffer[];
|
||||
|
||||
//
|
||||
bool bullishTrendBuffer[];
|
||||
bool bearishTrendBuffer[];
|
||||
|
||||
//
|
||||
double rsiSlope;
|
||||
double strSlope;
|
||||
@@ -292,11 +297,15 @@ struct X121Conditions
|
||||
bool isNewPeak;
|
||||
bool isNewPeakOverLast;
|
||||
bool isNewPeakUnderLast;
|
||||
bool isRejectedPrevPeak;
|
||||
bool isBreakedUpPrevPeak;
|
||||
|
||||
//
|
||||
bool isNewVale;
|
||||
bool isNewValeOverLast;
|
||||
bool isNewValeUnderLast;
|
||||
bool isRejectedPrevVale;
|
||||
bool isBreakedDownPrevVale;
|
||||
|
||||
//
|
||||
bool isStrBullish;
|
||||
@@ -488,6 +497,14 @@ struct X121Conditions
|
||||
bool isStrLowerCrossedOverDonLowLower;
|
||||
bool isStrLowerCrossedUnderDonLowLower;
|
||||
|
||||
//
|
||||
bool isTrendBullish;
|
||||
bool isTrendBearish;
|
||||
|
||||
//
|
||||
bool isTrendSwirchedToBullish;
|
||||
bool isTrendSwirchedToBearish;
|
||||
|
||||
//
|
||||
bool isAtrUpperOverPeak;
|
||||
bool isAtrUpperEqualsToPeak;
|
||||
@@ -546,6 +563,7 @@ struct X121Conditions
|
||||
Clean(peaksBuffer);
|
||||
Clean(valesBuffer);
|
||||
Clean(strUpBuffer);
|
||||
Clean(volumeBuffer);
|
||||
Clean(strDownBuffer);
|
||||
Clean(vwapMidBuffer);
|
||||
Clean(le1StartBuffer);
|
||||
@@ -574,6 +592,10 @@ struct X121Conditions
|
||||
Clean(donCloseUpperBuffer);
|
||||
Clean(donCloseLowerBuffer);
|
||||
|
||||
//
|
||||
Clean(bullishTrendBuffer);
|
||||
Clean(bearishTrendBuffer);
|
||||
|
||||
//
|
||||
ArraySetAsSeries(rsiBuffer, true);
|
||||
ArraySetAsSeries(atrBuffer, true);
|
||||
@@ -596,6 +618,7 @@ struct X121Conditions
|
||||
ArraySetAsSeries(peaksBuffer, true);
|
||||
ArraySetAsSeries(valesBuffer, true);
|
||||
ArraySetAsSeries(strUpBuffer, true);
|
||||
ArraySetAsSeries(volumeBuffer, true);
|
||||
ArraySetAsSeries(strDownBuffer, true);
|
||||
ArraySetAsSeries(vwapMidBuffer, true);
|
||||
ArraySetAsSeries(le1StartBuffer, true);
|
||||
@@ -624,6 +647,10 @@ struct X121Conditions
|
||||
ArraySetAsSeries(donCloseUpperBuffer, true);
|
||||
ArraySetAsSeries(donCloseLowerBuffer, true);
|
||||
|
||||
//
|
||||
ArraySetAsSeries(bullishTrendBuffer, true);
|
||||
ArraySetAsSeries(bearishTrendBuffer, true);
|
||||
|
||||
//
|
||||
cheMin = 0;
|
||||
cheMax = 0;
|
||||
@@ -747,11 +774,15 @@ struct X121Conditions
|
||||
isNewPeak = false;
|
||||
isNewPeakOverLast = false;
|
||||
isNewPeakUnderLast = false;
|
||||
isRejectedPrevPeak = false;
|
||||
isBreakedUpPrevPeak = false;
|
||||
|
||||
//
|
||||
isNewVale = false;
|
||||
isNewValeOverLast = false;
|
||||
isNewValeUnderLast = false;
|
||||
isRejectedPrevVale = false;
|
||||
isBreakedDownPrevVale = false;
|
||||
|
||||
//
|
||||
// STR ...
|
||||
@@ -983,6 +1014,14 @@ struct X121Conditions
|
||||
//
|
||||
isStrLowerCrossedOverDonLowLower = false;
|
||||
isStrLowerCrossedUnderDonLowLower = false;
|
||||
|
||||
//
|
||||
isTrendBullish = false;
|
||||
isTrendBearish = false;
|
||||
|
||||
//
|
||||
isTrendSwirchedToBullish = false;
|
||||
isTrendSwirchedToBearish = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1074,9 +1113,13 @@ struct X121Conditions
|
||||
ToString("isNewPeak", isNewPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isNewPeakOverLast", isNewPeakOverLast, ignoreFalseConditions, separator) +
|
||||
ToString("isNewPeakUnderLast", isNewPeakUnderLast, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectedPrevPeak", isRejectedPrevPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakedUpPrevPeak", isBreakedUpPrevPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isNewVale", isNewVale, ignoreFalseConditions, separator) +
|
||||
ToString("isNewValeOverLast", isNewValeOverLast, ignoreFalseConditions, separator) +
|
||||
ToString("isNewValeUnderLast", isNewValeUnderLast, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectedPrevVale", isRejectedPrevVale, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakedDownPrevVale", isBreakedDownPrevVale, ignoreFalseConditions, separator) +
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"> RSI ..." + separator +
|
||||
@@ -1188,6 +1231,10 @@ struct X121Conditions
|
||||
"-----------------------" + separator +
|
||||
"Coplex ..." + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isTrendBullish", isTrendBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendBearish", isTrendBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendSwirchedToBullish", isTrendSwirchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendSwirchedToBearish", isTrendSwirchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarIncreased", isSarIncreased, ignoreFalseConditions, separator) +
|
||||
ToString("isSarDecreased", isSarDecreased, ignoreFalseConditions, separator) +
|
||||
ToString("isSarEqualsToPeak", isSarEqualsToPeak, ignoreFalseConditions, separator) +
|
||||
@@ -1786,6 +1833,25 @@ class XCX121Helper : public XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Fill Volume Buffer ...
|
||||
for (int i = barIndex; i < barIndex + loopback; i++)
|
||||
{
|
||||
//
|
||||
// Reading Bar Valuem ...
|
||||
long iVol = iVolume(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
i //
|
||||
);
|
||||
|
||||
//
|
||||
Add(
|
||||
iVol,
|
||||
conditions.volumeBuffer //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Fill X121 Conditions Reference by Using
|
||||
// Retrieved Conditions ...
|
||||
@@ -1878,6 +1944,18 @@ class XCX121Helper : public XCBase
|
||||
conditions.hLLBuffer //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
xpvConditions.bullishTrendBuffer,
|
||||
conditions.bullishTrendBuffer //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
xpvConditions.bearishTrendBuffer,
|
||||
conditions.bearishTrendBuffer //
|
||||
);
|
||||
|
||||
//
|
||||
// Conditions ...
|
||||
|
||||
@@ -1890,6 +1968,10 @@ class XCX121Helper : public XCBase
|
||||
conditions.isNewValeOverLast = xpvConditions.isNewValeOverLast;
|
||||
conditions.isNewPeakUnderLast = xpvConditions.isNewPeakUnderLast;
|
||||
conditions.isNewValeUnderLast = xpvConditions.isNewValeUnderLast;
|
||||
conditions.isRejectedPrevVale = xpvConditions.isRejectedPrevVale;
|
||||
conditions.isRejectedPrevPeak = xpvConditions.isRejectedPrevPeak;
|
||||
conditions.isBreakedUpPrevPeak = xpvConditions.isBreakedUpPrevPeak;
|
||||
conditions.isBreakedDownPrevVale = xpvConditions.isBreakedDownPrevVale;
|
||||
conditions.isSarSwitchedToBullish = xpvConditions.isSarSwitchedToBullish;
|
||||
conditions.isSarSwitchedToBearish = xpvConditions.isSarSwitchedToBearish;
|
||||
|
||||
@@ -2286,6 +2368,20 @@ class XCX121Helper : public XCBase
|
||||
//
|
||||
// Complex Conditions ...
|
||||
|
||||
//
|
||||
bool isTrendBullish = conditions.bullishTrendBuffer[0];
|
||||
bool isTrendBullishPrev = conditions.bullishTrendBuffer[1];
|
||||
|
||||
//
|
||||
bool isTrendBearish = conditions.bearishTrendBuffer[0];
|
||||
bool isTrendBearishPrev = conditions.bearishTrendBuffer[1];
|
||||
|
||||
//
|
||||
bool isTrendSwirchedToBullish = isTrendBullish &&
|
||||
!isTrendBullishPrev;
|
||||
bool isTrendSwirchedToBearish = isTrendBearish &&
|
||||
!isTrendBearishPrev;
|
||||
|
||||
//
|
||||
double vwapFast = conditions.vwapFastBuffer[cIDX];
|
||||
double vwapMid = conditions.vwapMidBuffer[cIDX];
|
||||
@@ -2705,6 +2801,12 @@ class XCX121Helper : public XCBase
|
||||
conditions.vwapMin = vwapMin;
|
||||
conditions.vwapMax = vwapMax;
|
||||
|
||||
//
|
||||
conditions.isTrendBullish = isTrendBullish;
|
||||
conditions.isTrendBearish = isTrendBearish;
|
||||
conditions.isTrendSwirchedToBullish = isTrendSwirchedToBullish;
|
||||
conditions.isTrendSwirchedToBearish = isTrendSwirchedToBearish;
|
||||
|
||||
//
|
||||
conditions.isSarIncreased = isSarIncreased;
|
||||
conditions.isSarDecreased = isSarDecreased;
|
||||
|
||||
Reference in New Issue
Block a user