last ...
This commit is contained in:
@@ -3328,6 +3328,13 @@ class XCPOIDrawer : public XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw Specified State Zone ...
|
||||
*
|
||||
* @param source: XStateZones instance Reference ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int DrawStateZones(
|
||||
XStateZones &source,
|
||||
XCBaseObject *&drawnObjects[] //
|
||||
|
||||
@@ -0,0 +1,285 @@
|
||||
|
||||
//
|
||||
// Reading Previous Conditions ...
|
||||
ENUM_XPOI_EVENTS consolidationPoiEventsPrev[];
|
||||
ENUM_X_CYCLE_EVENTS consolidationCycleEventsPrev[];
|
||||
X121SMCCycleConditions consolidationConditionsPrev;
|
||||
result = consolidationCycleHelper.GetConditions(
|
||||
consolidationCycleEventsPrev,
|
||||
consolidationPoiEventsPrev,
|
||||
consolidationConditionsPrev,
|
||||
cIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
X121SMCCycleConditions conditionState = consolidationConditions;
|
||||
X121SMCCycleConditions conditionStatePrev = consolidationConditionsPrev;
|
||||
|
||||
//
|
||||
XOHCL cCBar;
|
||||
result = cCBar.Init(
|
||||
conditionState.symbol,
|
||||
conditionState.period,
|
||||
cIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL cPBar;
|
||||
result = cCBar.GetPreviousBar(cPBar);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Engulf ...
|
||||
ENUM_X_DIRECTION cCBarEngulfDir;
|
||||
bool isCCBarEngulfed = consolidationCycleHelper
|
||||
.mBarAnalyser
|
||||
.IsEngulfBar(
|
||||
cCBar,
|
||||
cCBarEngulfDir,
|
||||
0 // Extended ...
|
||||
);
|
||||
bool isCCBarBullishEngulfed =
|
||||
isCCBarEngulfed &&
|
||||
IsBullish(cCBarEngulfDir);
|
||||
bool isCCBarBearishEngulfed =
|
||||
isCCBarEngulfed &&
|
||||
IsBearish(cCBarEngulfDir);
|
||||
|
||||
//
|
||||
// Momentum ...
|
||||
ENUM_X_DIRECTION cCBarMomentumDir;
|
||||
bool isCCBarMomentum = consolidationCycleHelper
|
||||
.mBarAnalyser
|
||||
.IsMomentumBar(
|
||||
cCBar,
|
||||
cCBarMomentumDir,
|
||||
1 // Extended ...
|
||||
);
|
||||
bool isCCBarBullishMomentum =
|
||||
isCCBarMomentum &&
|
||||
IsBullish(cCBarMomentumDir);
|
||||
bool isCCBarBearishMomentum =
|
||||
isCCBarMomentum &&
|
||||
IsBearish(cCBarMomentumDir);
|
||||
|
||||
//
|
||||
// Reject ...
|
||||
ENUM_X_DIRECTION cCBarRejectDir;
|
||||
bool isCCBarRejected = consolidationCycleHelper
|
||||
.mBarAnalyser
|
||||
.IsRejectionBar(
|
||||
cCBar,
|
||||
cCBarRejectDir,
|
||||
1 // Extended ...
|
||||
);
|
||||
bool isCCBarBullishRejected =
|
||||
isCCBarRejected &&
|
||||
IsBullish(cCBarRejectDir);
|
||||
bool isCCBarBearishRejected =
|
||||
isCCBarRejected &&
|
||||
IsBearish(cCBarRejectDir);
|
||||
|
||||
//
|
||||
// Bar Checking Summary ...
|
||||
|
||||
//
|
||||
// Bullish ...
|
||||
bool isCCBarPassedBullish =
|
||||
//
|
||||
isCCBarBullishEngulfed ||
|
||||
isCCBarBullishMomentum ||
|
||||
isCCBarBullishRejected
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// Bearish ...
|
||||
bool isCCBarPassedBearish =
|
||||
//
|
||||
isCCBarBearishEngulfed ||
|
||||
isCCBarBearishMomentum ||
|
||||
isCCBarBearishRejected
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
double cPeakPrev = conditionStatePrev.x121Conditions.peaksBuffer[0];
|
||||
double cValePrev = conditionStatePrev.x121Conditions.valesBuffer[0];
|
||||
|
||||
//
|
||||
double cPeak = conditionState.x121Conditions.peaksBuffer[1];
|
||||
double cVale = conditionState.x121Conditions.valesBuffer[1];
|
||||
|
||||
//
|
||||
bool isCPeakSame = cPeak == cPeakPrev;
|
||||
bool isCValeSame = cVale == cValePrev;
|
||||
|
||||
//
|
||||
bool isCNewPeakPrev = conditionStatePrev.x121Conditions.isNewPeak;
|
||||
bool isCNewPeakOverLastPrev = conditionStatePrev.x121Conditions.isNewPeakOverLast;
|
||||
bool isCNewPeakUnderLastPrev = conditionStatePrev.x121Conditions.isNewPeakUnderLast;
|
||||
|
||||
//
|
||||
bool isCNewValePrev = conditionStatePrev.x121Conditions.isNewVale;
|
||||
bool isCNewValeOverLastPrev = conditionStatePrev.x121Conditions.isNewValeOverLast;
|
||||
bool isCNewValeUnderLastPrev = conditionStatePrev.x121Conditions.isNewValeUnderLast;
|
||||
|
||||
//
|
||||
bool isCRSIOverSold = conditionState.x121Conditions.isRSIOverSold;
|
||||
bool isCRSICrossedOverOverSold = conditionState.x121Conditions.isRSICrossedOverOverSold;
|
||||
bool isCRSICrossedUnderOverSold = conditionState.x121Conditions.isRSICrossedUnderOverSold;
|
||||
|
||||
//
|
||||
bool isCRSIOverBought = conditionState.x121Conditions.isRSIOverBought;
|
||||
bool isCRSICrossedOverOverBought = conditionState.x121Conditions.isRSICrossedOverOverBought;
|
||||
bool isCRSICrossedUnderOverBought = conditionState.x121Conditions.isRSICrossedUnderOverBought;
|
||||
|
||||
//
|
||||
bool isCRSIOverSoldPrev = conditionStatePrev.x121Conditions.isRSIOverSold;
|
||||
bool isCRSICrossedOverOverSoldPrev = conditionStatePrev.x121Conditions.isRSICrossedOverOverSold;
|
||||
bool isCRSICrossedUnderOverSoldPrev = conditionStatePrev.x121Conditions.isRSICrossedUnderOverSold;
|
||||
|
||||
//
|
||||
bool isCRSIOverBoughtPrev = conditionStatePrev.x121Conditions.isRSIOverBought;
|
||||
bool isCRSICrossedOverOverBoughtPrev = conditionStatePrev.x121Conditions.isRSICrossedOverOverBought;
|
||||
bool isCRSICrossedUnderOverBoughtPrev = conditionStatePrev.x121Conditions.isRSICrossedUnderOverBought;
|
||||
|
||||
//
|
||||
isBullish =
|
||||
//
|
||||
isCNewValePrev &&
|
||||
isCCBarPassedBullish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
isBearish =
|
||||
//
|
||||
isCNewPeakPrev &&
|
||||
isCCBarPassedBearish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
isBearish;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
conditions.pivot =
|
||||
isBullish
|
||||
? conditionState.x121Conditions.valesBuffer[1]
|
||||
: conditionState.x121Conditions.peaksBuffer[1];
|
||||
|
||||
//
|
||||
double peak = analyseConditions.x121Conditions.peaksBuffer[1];
|
||||
double vale = analyseConditions.x121Conditions.valesBuffer[1];
|
||||
|
||||
//
|
||||
double strUpper = analyseConditions.x121Conditions.strUpBuffer[1];
|
||||
double strLower = analyseConditions.x121Conditions.strDownBuffer[1];
|
||||
|
||||
//
|
||||
bool isStrSwitchedToBullish = analyseConditions.x121Conditions.isStrSwitchedToBullish;
|
||||
bool isStrSwitchedToBearish = analyseConditions.x121Conditions.isStrSwitchedToBearish;
|
||||
|
||||
//
|
||||
isBullish = isStrSwitchedToBullish;
|
||||
isBearish = isStrSwitchedToBearish;
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
isBearish;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
conditions.pivot =
|
||||
isBullish
|
||||
? peak
|
||||
: vale;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Looking For Sar Change ...
|
||||
|
||||
//
|
||||
double sar = analyseConditions.x121Conditions.sarBuffer[1];
|
||||
|
||||
//
|
||||
double peak = analyseConditions.x121Conditions.peaksBuffer[1];
|
||||
double vale = analyseConditions.x121Conditions.valesBuffer[1];
|
||||
|
||||
//
|
||||
bool isSarEqualsToPeak = analyseConditions.x121Conditions.isSarEqualsToPeak;
|
||||
bool isSarEqualsToVale = analyseConditions.x121Conditions.isSarEqualsToVale;
|
||||
|
||||
//
|
||||
bool isSarSwitchedToBullish = analyseConditions.x121Conditions.isSarSwitchedToBullish;
|
||||
bool isSarSwitchedToBearish = analyseConditions.x121Conditions.isSarSwitchedToBearish;
|
||||
|
||||
//
|
||||
isBullish =
|
||||
isBullish &&
|
||||
isSarEqualsToPeak &&
|
||||
isSarSwitchedToBullish;
|
||||
|
||||
//
|
||||
isBearish =
|
||||
isBearish &&
|
||||
isSarEqualsToVale &&
|
||||
isSarSwitchedToBearish;
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
isBearish;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
Print("Sar Switched ...");
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Detect a Zone Arround Price Zone ...
|
||||
int supplyZonesCount = consolidationState.CountSupplyZones();
|
||||
if (IsValidSize(supplyZonesCount)) {
|
||||
//
|
||||
for (int i = 0; i < supplyZonesCount; i++) {
|
||||
//
|
||||
XCSupplyZone *iZone = consolidationState.supplyZones[i];
|
||||
|
||||
//
|
||||
bool isOver = iZone.Lower() > pzUpper;
|
||||
bool isUnder = iZone.Upper() < pzLower;
|
||||
|
||||
//
|
||||
bool isValid =
|
||||
isOver ||
|
||||
isUnder;
|
||||
if (isValid) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+388
-117
@@ -186,34 +186,34 @@ struct X121Conditions
|
||||
//
|
||||
// Conditions ...
|
||||
|
||||
bool isRSIOverBought;
|
||||
bool isRSICrossedOverOverBought;
|
||||
bool isRSICrossedUnderOverBought;
|
||||
bool isRSIOverSold;
|
||||
bool isRSICrossedUnderOverSold;
|
||||
bool isRSICrossedOverOverSold;
|
||||
bool isRsiOverBought;
|
||||
bool isRsiCrossedOverOverBought;
|
||||
bool isRsiCrossedUnderOverBought;
|
||||
bool isRsiOverSold;
|
||||
bool isRsiCrossedUnderOverSold;
|
||||
bool isRsiCrossedOverOverSold;
|
||||
|
||||
//
|
||||
bool isCloseOverATRUpper;
|
||||
bool isCloseOverATRLower;
|
||||
bool isCloseUnderATRUpper;
|
||||
bool isCloseUnderATRLower;
|
||||
bool isCloseOverAtrUpper;
|
||||
bool isCloseOverAtrLower;
|
||||
bool isCloseUnderAtrUpper;
|
||||
bool isCloseUnderAtrLower;
|
||||
|
||||
//
|
||||
bool isRejectUpATRUpper;
|
||||
bool isRejectDownATRUpper;
|
||||
bool isRejectUpAtrUpper;
|
||||
bool isRejectDownAtrUpper;
|
||||
|
||||
//
|
||||
bool isRejectUpATRLower;
|
||||
bool isRejectDownATRLower;
|
||||
bool isRejectUpAtrLower;
|
||||
bool isRejectDownAtrLower;
|
||||
|
||||
//
|
||||
bool isBreakUpATRUpper;
|
||||
bool isBreakDownATRUpper;
|
||||
bool isBreakUpAtrUpper;
|
||||
bool isBreakDownAtrUpper;
|
||||
|
||||
//
|
||||
bool isBreakUpATRLower;
|
||||
bool isBreakDownATRLower;
|
||||
bool isBreakUpAtrLower;
|
||||
bool isBreakDownAtrLower;
|
||||
|
||||
//
|
||||
bool isRejectDonOpenUpper;
|
||||
@@ -294,20 +294,76 @@ struct X121Conditions
|
||||
bool isSarEqualsToVale;
|
||||
|
||||
//
|
||||
bool isNewPeakOverATRUpper;
|
||||
bool isNewValeUnderATRLower;
|
||||
bool isSarCrossedUnderPeak;
|
||||
bool isSarCrossedOverVale;
|
||||
|
||||
//
|
||||
bool isStrEqualsToPeak;
|
||||
bool isStrEqualsToVale;
|
||||
|
||||
//
|
||||
bool isStrCrossedUnderPeak;
|
||||
bool isStrCrossedOverVale;
|
||||
|
||||
//
|
||||
bool isPeakOverAtrUpper;
|
||||
bool isValeUnderAtrLower;
|
||||
|
||||
//
|
||||
bool isNewPeakOverAtrUpper;
|
||||
bool isNewValeUnderAtrLower;
|
||||
|
||||
//
|
||||
bool isStrUpperOverPeak;
|
||||
bool isStrUpperUnderPeak;
|
||||
|
||||
//
|
||||
bool isStrUpperCrossedOverPeak;
|
||||
bool isStrUpperCrossedUnderPeak;
|
||||
|
||||
//
|
||||
bool isStrLowerOverVale;
|
||||
bool isStrLowerUnderVale;
|
||||
|
||||
//
|
||||
bool isStrLowerCrossedOverVale;
|
||||
bool isStrLowerCrossedUnderVale;
|
||||
|
||||
//
|
||||
bool isDonHighUpperEqualsToPeak;
|
||||
bool isDonLowLowerEqualsToVale;
|
||||
|
||||
//
|
||||
bool isSTRUpperCrossedOverATRUpper;
|
||||
bool isSTRLowerCrossedUnderATRLower;
|
||||
bool isStrUpperOverAtrUpper;
|
||||
bool isStrUpperUnderAtrUpper;
|
||||
|
||||
//
|
||||
bool isSTRUpperCrossedOverDonHighUpper;
|
||||
bool isSTRLowerCrossedUnderDonLowLower;
|
||||
bool isStrLowerOverAtrLower;
|
||||
bool isStrLowerUnderAtrLower;
|
||||
|
||||
//
|
||||
bool isStrUpperCrossedOverAtrUpper;
|
||||
bool isStrUpperCrossedUnderAtrUpper;
|
||||
|
||||
//
|
||||
bool isStrLowerCrossedOverAtrLower;
|
||||
bool isStrLowerCrossedUnderAtrLower;
|
||||
|
||||
//
|
||||
bool isStrUpperOverDonHighUpper;
|
||||
bool isStrUpperUnderDonHighUpper;
|
||||
|
||||
//
|
||||
bool isStrLowerOverDonLowLower;
|
||||
bool isStrLowerUnderDonLowLower;
|
||||
|
||||
//
|
||||
bool isStrUpperCrossedOverDonHighUpper;
|
||||
bool isStrUpperCrossedUnderDonHighUpper;
|
||||
|
||||
//
|
||||
bool isStrLowerCrossedOverDonLowLower;
|
||||
bool isStrLowerCrossedUnderDonLowLower;
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
@@ -424,41 +480,41 @@ struct X121Conditions
|
||||
// RSI ...
|
||||
|
||||
//
|
||||
isRSIOverBought = false;
|
||||
isRSICrossedOverOverBought = false;
|
||||
isRSICrossedUnderOverBought = false;
|
||||
isRsiOverBought = false;
|
||||
isRsiCrossedOverOverBought = false;
|
||||
isRsiCrossedUnderOverBought = false;
|
||||
|
||||
//
|
||||
isRSIOverSold = false;
|
||||
isRSICrossedUnderOverSold = false;
|
||||
isRSICrossedOverOverSold = false;
|
||||
isRsiOverSold = false;
|
||||
isRsiCrossedUnderOverSold = false;
|
||||
isRsiCrossedOverOverSold = false;
|
||||
|
||||
//
|
||||
// ATR ...
|
||||
|
||||
//
|
||||
isCloseOverATRUpper = false;
|
||||
isCloseOverATRLower = false;
|
||||
isCloseOverAtrUpper = false;
|
||||
isCloseOverAtrLower = false;
|
||||
|
||||
//
|
||||
isCloseUnderATRUpper = false;
|
||||
isCloseUnderATRLower = false;
|
||||
isCloseUnderAtrUpper = false;
|
||||
isCloseUnderAtrLower = false;
|
||||
|
||||
//
|
||||
isRejectUpATRUpper = false;
|
||||
isRejectDownATRUpper = false;
|
||||
isRejectUpAtrUpper = false;
|
||||
isRejectDownAtrUpper = false;
|
||||
|
||||
//
|
||||
isRejectUpATRLower = false;
|
||||
isRejectDownATRLower = false;
|
||||
isRejectUpAtrLower = false;
|
||||
isRejectDownAtrLower = false;
|
||||
|
||||
//
|
||||
isBreakUpATRUpper = false;
|
||||
isBreakDownATRUpper = false;
|
||||
isBreakUpAtrUpper = false;
|
||||
isBreakDownAtrUpper = false;
|
||||
|
||||
//
|
||||
isBreakUpATRLower = false;
|
||||
isBreakDownATRLower = false;
|
||||
isBreakUpAtrLower = false;
|
||||
isBreakDownAtrLower = false;
|
||||
|
||||
//
|
||||
// DON ...
|
||||
@@ -574,20 +630,76 @@ struct X121Conditions
|
||||
isSarEqualsToVale = false;
|
||||
|
||||
//
|
||||
isNewPeakOverATRUpper = false;
|
||||
isNewValeUnderATRLower = false;
|
||||
isSarCrossedUnderPeak = false;
|
||||
isSarCrossedOverVale = false;
|
||||
|
||||
//
|
||||
isStrEqualsToPeak = false;
|
||||
isStrEqualsToVale = false;
|
||||
|
||||
//
|
||||
isStrCrossedUnderPeak = false;
|
||||
isStrCrossedOverVale = false;
|
||||
|
||||
//
|
||||
isPeakOverAtrUpper = false;
|
||||
isValeUnderAtrLower = false;
|
||||
|
||||
//
|
||||
isNewPeakOverAtrUpper = false;
|
||||
isNewValeUnderAtrLower = false;
|
||||
|
||||
//
|
||||
isStrUpperOverPeak = false;
|
||||
isStrUpperUnderPeak = false;
|
||||
|
||||
//
|
||||
isStrUpperCrossedOverPeak = false;
|
||||
isStrUpperCrossedUnderPeak = false;
|
||||
|
||||
//
|
||||
isStrLowerOverVale = false;
|
||||
isStrLowerUnderVale = false;
|
||||
|
||||
//
|
||||
isStrLowerCrossedOverVale = false;
|
||||
isStrLowerCrossedUnderVale = false;
|
||||
|
||||
//
|
||||
isDonHighUpperEqualsToPeak = false;
|
||||
isDonLowLowerEqualsToVale = false;
|
||||
|
||||
//
|
||||
isSTRUpperCrossedOverATRUpper = false;
|
||||
isSTRLowerCrossedUnderATRLower = false;
|
||||
isStrUpperOverAtrUpper = false;
|
||||
isStrUpperUnderAtrUpper = false;
|
||||
|
||||
//
|
||||
isSTRUpperCrossedOverDonHighUpper = false;
|
||||
isSTRLowerCrossedUnderDonLowLower = false;
|
||||
isStrLowerOverAtrLower = false;
|
||||
isStrLowerUnderAtrLower = false;
|
||||
|
||||
//
|
||||
isStrUpperCrossedOverAtrUpper = false;
|
||||
isStrUpperCrossedUnderAtrUpper = false;
|
||||
|
||||
//
|
||||
isStrLowerCrossedOverAtrLower = false;
|
||||
isStrLowerCrossedUnderAtrLower = false;
|
||||
|
||||
//
|
||||
isStrUpperOverDonHighUpper = false;
|
||||
isStrUpperUnderDonHighUpper = false;
|
||||
|
||||
//
|
||||
isStrLowerOverDonLowLower = false;
|
||||
isStrLowerUnderDonLowLower = false;
|
||||
|
||||
//
|
||||
isStrUpperCrossedOverDonHighUpper = false;
|
||||
isStrUpperCrossedUnderDonHighUpper = false;
|
||||
|
||||
//
|
||||
isStrLowerCrossedOverDonLowLower = false;
|
||||
isStrLowerCrossedUnderDonLowLower = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -657,6 +769,7 @@ struct X121Conditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"SAR ..." + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isSarBullish", isSarBullish, ignoreFalseConditions, separator) +
|
||||
@@ -664,6 +777,7 @@ struct X121Conditions
|
||||
ToString("isSarSwitchedToBullish", isSarSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarSwitchedToBearish", isSarSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"STR ..." + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isStrBullish", isStrBullish, ignoreFalseConditions, separator) +
|
||||
@@ -671,6 +785,7 @@ struct X121Conditions
|
||||
ToString("isStrSwitchedToBullish", isStrSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isStrSwitchedToBearish", isStrSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"PV ..." + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isNewPeak", isNewPeak, ignoreFalseConditions, separator) +
|
||||
@@ -680,32 +795,35 @@ struct X121Conditions
|
||||
ToString("isNewValeOverLast", isNewValeOverLast, ignoreFalseConditions, separator) +
|
||||
ToString("isNewValeUnderLast", isNewValeUnderLast, ignoreFalseConditions, separator) +
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"> RSI ..." + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isRSIOverBought", isRSIOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRSICrossedOverOverBought", isRSICrossedOverOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRSICrossedUnderOverBought", isRSICrossedUnderOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRSIOverSold", isRSIOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRSICrossedUnderOverSold", isRSICrossedUnderOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRSICrossedOverOverSold", isRSICrossedOverOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiOverBought", isRsiOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiCrossedOverOverBought", isRsiCrossedOverOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiCrossedUnderOverBought", isRsiCrossedUnderOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiOverSold", isRsiOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiCrossedUnderOverSold", isRsiCrossedUnderOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiCrossedOverOverSold", isRsiCrossedOverOverSold, ignoreFalseConditions, separator) +
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"ATR ..." + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isCloseOverATRUpper", isCloseOverATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseOverATRLower", isCloseOverATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseUnderATRUpper", isCloseUnderATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseUnderATRLower", isCloseUnderATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectUpATRUpper", isRejectUpATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDownATRUpper", isRejectDownATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectUpATRLower", isRejectUpATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDownATRLower", isRejectDownATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakUpATRUpper", isBreakUpATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakDownATRUpper", isBreakDownATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakUpATRLower", isBreakUpATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseOverAtrUpper", isCloseOverAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseOverAtrLower", isCloseOverAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseUnderAtrUpper", isCloseUnderAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseUnderAtrLower", isCloseUnderAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectUpAtrUpper", isRejectUpAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDownAtrUpper", isRejectDownAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectUpAtrLower", isRejectUpAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDownAtrLower", isRejectDownAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakUpAtrUpper", isBreakUpAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakDownAtrUpper", isBreakDownAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakUpAtrLower", isBreakUpAtrLower, ignoreFalseConditions, separator) +
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"DON ..." + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isBreakDownATRLower", isBreakDownATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakDownAtrLower", isBreakDownAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDonOpenUpper", isRejectDonOpenUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDonHighUpper", isRejectDonHighUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDonLowUpper", isRejectDonLowUpper, ignoreFalseConditions, separator) +
|
||||
@@ -723,6 +841,7 @@ struct X121Conditions
|
||||
ToString("isBreakDonLowLower", isBreakDonLowLower, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakDonCloseLower", isBreakDonCloseLower, ignoreFalseConditions, separator) +
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"VWAP ..." + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isVWapFastBullish", isVWapFastBullish, ignoreFalseConditions, separator) +
|
||||
@@ -754,14 +873,42 @@ struct X121Conditions
|
||||
"-----------------------" + separator +
|
||||
ToString("isSarEqualsToPeak", isSarEqualsToPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isSarEqualsToVale", isSarEqualsToVale, ignoreFalseConditions, separator) +
|
||||
ToString("isNewPeakOverATRUpper", isNewPeakOverATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isNewValeUnderATRLower", isNewValeUnderATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isSarCrossedUnderPeak", isSarCrossedUnderPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isSarCrossedOverVale", isSarCrossedOverVale, ignoreFalseConditions, separator) +
|
||||
ToString("isStrEqualsToPeak", isStrEqualsToPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isStrEqualsToVale", isStrEqualsToVale, ignoreFalseConditions, separator) +
|
||||
ToString("isStrCrossedUnderPeak", isStrCrossedUnderPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isStrCrossedOverVale", isStrCrossedOverVale, ignoreFalseConditions, separator) +
|
||||
ToString("isPeakOverAtrUpper", isPeakOverAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isValeUnderAtrLower", isValeUnderAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isNewPeakOverAtrUpper", isNewPeakOverAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isNewValeUnderAtrLower", isNewValeUnderAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperOverPeak", isStrUpperOverPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperUnderPeak", isStrUpperUnderPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperCrossedOverPeak", isStrUpperCrossedOverPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperCrossedUnderPeak", isStrUpperCrossedUnderPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerOverVale", isStrLowerOverVale, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerUnderVale", isStrLowerUnderVale, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerCrossedOverVale", isStrLowerCrossedOverVale, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerCrossedUnderVale", isStrLowerCrossedUnderVale, ignoreFalseConditions, separator) +
|
||||
ToString("isDonHighUpperEqualsToPeak", isDonHighUpperEqualsToPeak, ignoreFalseConditions, separator) +
|
||||
ToString("isDonLowLowerEqualsToVale", isDonLowLowerEqualsToVale, ignoreFalseConditions, separator) +
|
||||
ToString("isSTRUpperCrossedOverATRUpper", isSTRUpperCrossedOverATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isSTRLowerCrossedUnderATRLower", isSTRLowerCrossedUnderATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isSTRUpperCrossedOverDonHighUpper", isSTRUpperCrossedOverDonHighUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isSTRLowerCrossedUnderDonLowLower", isSTRLowerCrossedUnderDonLowLower, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperOverAtrUpper", isStrUpperOverAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperUnderAtrUpper", isStrUpperUnderAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerOverAtrLower", isStrLowerOverAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerUnderAtrLower", isStrLowerUnderAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperCrossedOverAtrUpper", isStrUpperCrossedOverAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperCrossedUnderAtrUpper", isStrUpperCrossedUnderAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerCrossedOverAtrLower", isStrLowerCrossedOverAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerCrossedUnderAtrLower", isStrLowerCrossedUnderAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperOverDonHighUpper", isStrUpperOverDonHighUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperUnderDonHighUpper", isStrUpperUnderDonHighUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerOverDonLowLower", isStrLowerOverDonLowLower, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerUnderDonLowLower", isStrLowerUnderDonLowLower, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperCrossedOverDonHighUpper", isStrUpperCrossedOverDonHighUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isStrUpperCrossedUnderDonHighUpper", isStrUpperCrossedUnderDonHighUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerCrossedOverDonLowLower", isStrLowerCrossedOverDonLowLower, ignoreFalseConditions, separator) +
|
||||
ToString("isStrLowerCrossedUnderDonLowLower", isStrLowerCrossedUnderDonLowLower, ignoreFalseConditions, separator) +
|
||||
//
|
||||
""
|
||||
//
|
||||
@@ -1378,24 +1525,24 @@ class XCX121Helper : public XCBase
|
||||
// Conditions ...
|
||||
|
||||
//
|
||||
conditions.isRSIOverSold = xatrConditions.isRSIOverSold;
|
||||
conditions.isRSIOverBought = xatrConditions.isRSIOverBought;
|
||||
conditions.isBreakUpATRUpper = xatrConditions.isBreakUpATRUpper;
|
||||
conditions.isBreakUpATRLower = xatrConditions.isBreakUpATRLower;
|
||||
conditions.isCloseOverATRUpper = xatrConditions.isCloseOverATRUpper;
|
||||
conditions.isRejectUpATRUpper = xatrConditions.isRejectUpATRUpper;
|
||||
conditions.isRejectUpATRLower = xatrConditions.isRejectUpATRLower;
|
||||
conditions.isCloseOverATRLower = xatrConditions.isCloseOverATRLower;
|
||||
conditions.isBreakDownATRUpper = xatrConditions.isBreakDownATRUpper;
|
||||
conditions.isBreakDownATRLower = xatrConditions.isBreakDownATRLower;
|
||||
conditions.isCloseUnderATRUpper = xatrConditions.isCloseUnderATRUpper;
|
||||
conditions.isCloseUnderATRLower = xatrConditions.isCloseUnderATRLower;
|
||||
conditions.isRejectDownATRUpper = xatrConditions.isRejectDownATRUpper;
|
||||
conditions.isRejectDownATRLower = xatrConditions.isRejectDownATRLower;
|
||||
conditions.isRSICrossedOverOverSold = xatrConditions.isRSICrossedOverOverSold;
|
||||
conditions.isRSICrossedUnderOverSold = xatrConditions.isRSICrossedUnderOverSold;
|
||||
conditions.isRSICrossedOverOverBought = xatrConditions.isRSICrossedOverOverBought;
|
||||
conditions.isRSICrossedUnderOverBought = xatrConditions.isRSICrossedUnderOverBought;
|
||||
conditions.isRsiOverSold = xatrConditions.isRsiOverSold;
|
||||
conditions.isRsiOverBought = xatrConditions.isRsiOverBought;
|
||||
conditions.isBreakUpAtrUpper = xatrConditions.isBreakUpAtrUpper;
|
||||
conditions.isBreakUpAtrLower = xatrConditions.isBreakUpAtrLower;
|
||||
conditions.isCloseOverAtrUpper = xatrConditions.isCloseOverAtrUpper;
|
||||
conditions.isRejectUpAtrUpper = xatrConditions.isRejectUpAtrUpper;
|
||||
conditions.isRejectUpAtrLower = xatrConditions.isRejectUpAtrLower;
|
||||
conditions.isCloseOverAtrLower = xatrConditions.isCloseOverAtrLower;
|
||||
conditions.isBreakDownAtrUpper = xatrConditions.isBreakDownAtrUpper;
|
||||
conditions.isBreakDownAtrLower = xatrConditions.isBreakDownAtrLower;
|
||||
conditions.isCloseUnderAtrUpper = xatrConditions.isCloseUnderAtrUpper;
|
||||
conditions.isCloseUnderAtrLower = xatrConditions.isCloseUnderAtrLower;
|
||||
conditions.isRejectDownAtrUpper = xatrConditions.isRejectDownAtrUpper;
|
||||
conditions.isRejectDownAtrLower = xatrConditions.isRejectDownAtrLower;
|
||||
conditions.isRsiCrossedOverOverSold = xatrConditions.isRsiCrossedOverOverSold;
|
||||
conditions.isRsiCrossedUnderOverSold = xatrConditions.isRsiCrossedUnderOverSold;
|
||||
conditions.isRsiCrossedOverOverBought = xatrConditions.isRsiCrossedOverOverBought;
|
||||
conditions.isRsiCrossedUnderOverBought = xatrConditions.isRsiCrossedUnderOverBought;
|
||||
|
||||
//
|
||||
// XSTR ...
|
||||
@@ -1613,13 +1760,77 @@ class XCX121Helper : public XCBase
|
||||
conditions.sarBuffer[cIDX] == conditions.valesBuffer[cIDX];
|
||||
|
||||
//
|
||||
bool isNewPeakOverATRUpper =
|
||||
conditions.isNewPeak &&
|
||||
bool isSarCrossedUnderPeak =
|
||||
conditions.sarBuffer[cIDX] < conditions.peaksBuffer[cIDX] &&
|
||||
!(conditions.sarBuffer[pIDX] < conditions.peaksBuffer[pIDX]);
|
||||
bool isSarCrossedOverVale =
|
||||
conditions.sarBuffer[cIDX] > conditions.valesBuffer[cIDX] &&
|
||||
!(conditions.sarBuffer[pIDX] > conditions.valesBuffer[pIDX]);
|
||||
|
||||
//
|
||||
bool isStrEqualsToPeak =
|
||||
conditions.strBuffer[cIDX] == conditions.peaksBuffer[cIDX];
|
||||
bool isStrEqualsToVale =
|
||||
conditions.strBuffer[cIDX] == conditions.valesBuffer[cIDX];
|
||||
|
||||
//
|
||||
bool isStrCrossedUnderPeak =
|
||||
conditions.strBuffer[cIDX] < conditions.peaksBuffer[cIDX] &&
|
||||
!(conditions.strBuffer[pIDX] < conditions.peaksBuffer[pIDX]);
|
||||
bool isStrCrossedOverVale =
|
||||
conditions.strBuffer[cIDX] > conditions.valesBuffer[cIDX] &&
|
||||
!(conditions.strBuffer[pIDX] > conditions.valesBuffer[pIDX]);
|
||||
|
||||
//
|
||||
bool isPeakOverAtrUpper =
|
||||
conditions.peaksBuffer[cIDX] > conditions.atrUpperBuffer[cIDX];
|
||||
bool isNewValeUnderATRLower =
|
||||
conditions.isNewVale &&
|
||||
bool isValeUnderAtrLower =
|
||||
conditions.valesBuffer[cIDX] > conditions.atrLowerBuffer[cIDX];
|
||||
|
||||
//
|
||||
bool isNewPeakOverAtrUpper =
|
||||
isPeakOverAtrUpper &&
|
||||
conditions.isNewPeak;
|
||||
bool isNewValeUnderAtrLower =
|
||||
isValeUnderAtrLower &&
|
||||
conditions.isNewVale;
|
||||
|
||||
//
|
||||
bool isStrUpperOverPeak =
|
||||
conditions.strBuffer[cIDX] > conditions.peaksBuffer[cIDX];
|
||||
bool isStrUpperOverPeakPrev =
|
||||
conditions.strBuffer[pIDX] > conditions.peaksBuffer[pIDX];
|
||||
|
||||
//
|
||||
bool isStrUpperUnderPeak =
|
||||
conditions.strBuffer[cIDX] < conditions.peaksBuffer[cIDX];
|
||||
bool isStrUpperUnderPeakPrev =
|
||||
conditions.strBuffer[pIDX] < conditions.peaksBuffer[pIDX];
|
||||
|
||||
//
|
||||
bool isStrUpperCrossedOverPeak = isStrUpperOverPeak &&
|
||||
!isStrUpperOverPeakPrev;
|
||||
bool isStrUpperCrossedUnderPeak = isStrUpperUnderPeak &&
|
||||
!isStrUpperUnderPeakPrev;
|
||||
|
||||
//
|
||||
bool isStrLowerOverVale =
|
||||
conditions.strBuffer[cIDX] > conditions.valesBuffer[cIDX];
|
||||
bool isStrLowerOverValePrev =
|
||||
conditions.strBuffer[pIDX] > conditions.valesBuffer[pIDX];
|
||||
|
||||
//
|
||||
bool isStrLowerUnderVale =
|
||||
conditions.strBuffer[cIDX] < conditions.valesBuffer[cIDX];
|
||||
bool isStrLowerUnderValePrev =
|
||||
conditions.strBuffer[pIDX] < conditions.valesBuffer[pIDX];
|
||||
|
||||
//
|
||||
bool isStrLowerCrossedOverVale = isStrLowerOverVale &&
|
||||
!isStrLowerOverValePrev;
|
||||
bool isStrLowerCrossedUnderVale = isStrLowerUnderVale &&
|
||||
!isStrLowerUnderValePrev;
|
||||
|
||||
//
|
||||
bool isDonHighUpperEqualsToPeak =
|
||||
conditions.donHighUpperBuffer[cIDX] == conditions.peaksBuffer[cIDX];
|
||||
@@ -1627,48 +1838,108 @@ class XCX121Helper : public XCBase
|
||||
conditions.donLowLowerBuffer[cIDX] == conditions.valesBuffer[cIDX];
|
||||
|
||||
//
|
||||
bool isSTRUpperOverATRUpper =
|
||||
bool isStrUpperOverAtrUpper =
|
||||
conditions.strUpBuffer[cIDX] > conditions.atrUpperBuffer[cIDX];
|
||||
bool isSTRUpperOverATRUpperPrev =
|
||||
bool isStrUpperOverAtrUpperPrev =
|
||||
conditions.strUpBuffer[pIDX] > conditions.atrUpperBuffer[pIDX];
|
||||
bool isSTRUpperCrossedOverATRUpper = isSTRUpperOverATRUpper &&
|
||||
!isSTRUpperOverATRUpperPrev;
|
||||
bool isStrUpperCrossedOverAtrUpper = isStrUpperOverAtrUpper &&
|
||||
!isStrUpperOverAtrUpperPrev;
|
||||
|
||||
//
|
||||
bool isSTRLowerUnderATRLower =
|
||||
bool isStrUpperUnderAtrUpper =
|
||||
conditions.strUpBuffer[cIDX] < conditions.atrUpperBuffer[cIDX];
|
||||
bool isStrUpperUnderAtrUpperPrev =
|
||||
conditions.strUpBuffer[pIDX] < conditions.atrUpperBuffer[pIDX];
|
||||
bool isStrUpperCrossedUnderAtrUpper = isStrUpperUnderAtrUpper &&
|
||||
!isStrUpperUnderAtrUpperPrev;
|
||||
|
||||
//
|
||||
bool isStrLowerOverAtrLower =
|
||||
conditions.strDownBuffer[cIDX] > conditions.atrLowerBuffer[cIDX];
|
||||
bool isStrLowerOverAtrLowerPrev =
|
||||
conditions.strDownBuffer[pIDX] > conditions.atrLowerBuffer[pIDX];
|
||||
bool isStrLowerCrossedOverAtrLower = isStrLowerOverAtrLower &&
|
||||
!isStrLowerOverAtrLowerPrev;
|
||||
|
||||
//
|
||||
bool isStrLowerUnderAtrLower =
|
||||
conditions.strDownBuffer[cIDX] < conditions.atrLowerBuffer[cIDX];
|
||||
bool isSTRLowerUnderATRLowerPrev =
|
||||
bool isStrLowerUnderAtrLowerPrev =
|
||||
conditions.strDownBuffer[pIDX] < conditions.atrLowerBuffer[pIDX];
|
||||
bool isSTRLowerCrossedUnderATRLower = isSTRLowerUnderATRLower &&
|
||||
!isSTRLowerUnderATRLowerPrev;
|
||||
bool isStrLowerCrossedUnderAtrLower = isStrLowerUnderAtrLower &&
|
||||
!isStrLowerUnderAtrLowerPrev;
|
||||
|
||||
//
|
||||
bool isSTRUpperOverDonHighUpper =
|
||||
bool isStrUpperOverDonHighUpper =
|
||||
conditions.strUpBuffer[cIDX] > conditions.donHighUpperBuffer[cIDX];
|
||||
bool isSTRUpperOverDonHighUpperPrev =
|
||||
bool isStrUpperOverDonHighUpperPrev =
|
||||
conditions.strUpBuffer[pIDX] > conditions.donHighUpperBuffer[pIDX];
|
||||
bool isSTRUpperCrossedOverDonHighUpper = isSTRUpperOverDonHighUpper &&
|
||||
!isSTRUpperOverDonHighUpperPrev;
|
||||
bool isStrUpperCrossedOverDonHighUpper = isStrUpperOverDonHighUpper &&
|
||||
!isStrUpperOverDonHighUpperPrev;
|
||||
|
||||
//
|
||||
bool isSTRLowerUnderDonLowLower =
|
||||
bool isStrUpperUnderDonHighUpper =
|
||||
conditions.strUpBuffer[cIDX] < conditions.donHighUpperBuffer[cIDX];
|
||||
bool isStrUpperUnderDonHighUpperPrev =
|
||||
conditions.strUpBuffer[pIDX] < conditions.donHighUpperBuffer[pIDX];
|
||||
bool isStrUpperCrossedUnderDonHighUpper = isStrUpperUnderDonHighUpper &&
|
||||
!isStrUpperUnderDonHighUpperPrev;
|
||||
|
||||
//
|
||||
bool isStrLowerOverDonLowLower =
|
||||
conditions.strDownBuffer[cIDX] > conditions.donLowLowerBuffer[cIDX];
|
||||
bool isStrLowerOverDonLowLowerPrev =
|
||||
conditions.strDownBuffer[pIDX] > conditions.donLowLowerBuffer[pIDX];
|
||||
bool isStrLowerCrossedOverDonLowLower = isStrLowerOverDonLowLower &&
|
||||
!isStrLowerOverDonLowLowerPrev;
|
||||
|
||||
//
|
||||
bool isStrLowerUnderDonLowLower =
|
||||
conditions.strDownBuffer[cIDX] < conditions.donLowLowerBuffer[cIDX];
|
||||
bool isSTRLowerUnderDonLowLowerPrev =
|
||||
bool isStrLowerUnderDonLowLowerPrev =
|
||||
conditions.strDownBuffer[pIDX] < conditions.donLowLowerBuffer[pIDX];
|
||||
bool isSTRLowerCrossedUnderDonLowLower = isSTRLowerUnderDonLowLower &&
|
||||
!isSTRLowerUnderDonLowLowerPrev;
|
||||
bool isStrLowerCrossedUnderDonLowLower = isStrLowerUnderDonLowLower &&
|
||||
!isStrLowerUnderDonLowLowerPrev;
|
||||
|
||||
//
|
||||
conditions.isSarEqualsToPeak = isSarEqualsToPeak;
|
||||
conditions.isSarEqualsToVale = isSarEqualsToVale;
|
||||
conditions.isNewPeakOverATRUpper = isNewPeakOverATRUpper;
|
||||
conditions.isNewValeUnderATRLower = isNewValeUnderATRLower;
|
||||
conditions.isDonHighUpperEqualsToPeak = isDonHighUpperEqualsToPeak;
|
||||
conditions.isStrEqualsToPeak = isStrEqualsToPeak;
|
||||
conditions.isStrEqualsToVale = isStrEqualsToVale;
|
||||
conditions.isStrUpperOverPeak = isStrUpperOverPeak;
|
||||
conditions.isPeakOverAtrUpper = isPeakOverAtrUpper;
|
||||
conditions.isStrLowerOverVale = isStrLowerOverVale;
|
||||
conditions.isStrLowerUnderVale = isStrLowerUnderVale;
|
||||
conditions.isStrUpperUnderPeak = isStrUpperUnderPeak;
|
||||
conditions.isValeUnderAtrLower = isValeUnderAtrLower;
|
||||
conditions.isSarCrossedOverVale = isSarCrossedOverVale;
|
||||
conditions.isStrCrossedOverVale = isStrCrossedOverVale;
|
||||
conditions.isSarCrossedUnderPeak = isSarCrossedUnderPeak;
|
||||
conditions.isStrCrossedUnderPeak = isStrCrossedUnderPeak;
|
||||
conditions.isNewPeakOverAtrUpper = isNewPeakOverAtrUpper;
|
||||
conditions.isNewValeUnderAtrLower = isNewValeUnderAtrLower;
|
||||
conditions.isStrUpperOverAtrUpper = isStrUpperOverAtrUpper;
|
||||
conditions.isStrLowerOverAtrLower = isStrLowerOverAtrLower;
|
||||
conditions.isStrUpperUnderAtrUpper = isStrUpperUnderAtrUpper;
|
||||
conditions.isStrLowerUnderAtrLower = isStrLowerUnderAtrLower;
|
||||
conditions.isDonLowLowerEqualsToVale = isDonLowLowerEqualsToVale;
|
||||
conditions.isSTRUpperCrossedOverATRUpper = isSTRUpperCrossedOverATRUpper;
|
||||
conditions.isSTRLowerCrossedUnderATRLower = isSTRLowerCrossedUnderATRLower;
|
||||
conditions.isSTRUpperCrossedOverDonHighUpper = isSTRUpperCrossedOverDonHighUpper;
|
||||
conditions.isSTRLowerCrossedUnderDonLowLower = isSTRLowerCrossedUnderDonLowLower;
|
||||
conditions.isStrUpperCrossedOverPeak = isStrUpperCrossedOverPeak;
|
||||
conditions.isStrLowerCrossedOverVale = isStrLowerCrossedOverVale;
|
||||
conditions.isStrLowerOverDonLowLower = isStrLowerOverDonLowLower;
|
||||
conditions.isStrUpperOverDonHighUpper = isStrUpperOverDonHighUpper;
|
||||
conditions.isStrLowerUnderDonLowLower = isStrLowerUnderDonLowLower;
|
||||
conditions.isDonHighUpperEqualsToPeak = isDonHighUpperEqualsToPeak;
|
||||
conditions.isStrUpperCrossedUnderPeak = isStrUpperCrossedUnderPeak;
|
||||
conditions.isStrLowerCrossedUnderVale = isStrLowerCrossedUnderVale;
|
||||
conditions.isStrUpperUnderDonHighUpper = isStrUpperUnderDonHighUpper;
|
||||
conditions.isStrLowerCrossedOverAtrLower = isStrLowerCrossedOverAtrLower;
|
||||
conditions.isStrUpperCrossedOverAtrUpper = isStrUpperCrossedOverAtrUpper;
|
||||
conditions.isStrUpperCrossedUnderAtrUpper = isStrUpperCrossedUnderAtrUpper;
|
||||
conditions.isStrLowerCrossedUnderAtrLower = isStrLowerCrossedUnderAtrLower;
|
||||
conditions.isStrLowerCrossedOverDonLowLower = isStrLowerCrossedOverDonLowLower;
|
||||
conditions.isStrUpperCrossedOverDonHighUpper = isStrUpperCrossedOverDonHighUpper;
|
||||
conditions.isStrLowerCrossedUnderDonLowLower = isStrLowerCrossedUnderDonLowLower;
|
||||
conditions.isStrUpperCrossedUnderDonHighUpper = isStrUpperCrossedUnderDonHighUpper;
|
||||
|
||||
//
|
||||
return result;
|
||||
|
||||
@@ -197,41 +197,41 @@ struct X121XATRConditions
|
||||
// RSI ...
|
||||
|
||||
//
|
||||
bool isRSIOverBought;
|
||||
bool isRSICrossedOverOverBought;
|
||||
bool isRSICrossedUnderOverBought;
|
||||
bool isRsiOverBought;
|
||||
bool isRsiCrossedOverOverBought;
|
||||
bool isRsiCrossedUnderOverBought;
|
||||
|
||||
//
|
||||
bool isRSIOverSold;
|
||||
bool isRSICrossedUnderOverSold;
|
||||
bool isRSICrossedOverOverSold;
|
||||
bool isRsiOverSold;
|
||||
bool isRsiCrossedUnderOverSold;
|
||||
bool isRsiCrossedOverOverSold;
|
||||
|
||||
//
|
||||
// ATR ...
|
||||
|
||||
//
|
||||
bool isCloseOverATRUpper;
|
||||
bool isCloseOverATRLower;
|
||||
bool isCloseOverAtrUpper;
|
||||
bool isCloseOverAtrLower;
|
||||
|
||||
//
|
||||
bool isCloseUnderATRUpper;
|
||||
bool isCloseUnderATRLower;
|
||||
bool isCloseUnderAtrUpper;
|
||||
bool isCloseUnderAtrLower;
|
||||
|
||||
//
|
||||
bool isRejectUpATRUpper;
|
||||
bool isRejectDownATRUpper;
|
||||
bool isRejectUpAtrUpper;
|
||||
bool isRejectDownAtrUpper;
|
||||
|
||||
//
|
||||
bool isRejectUpATRLower;
|
||||
bool isRejectDownATRLower;
|
||||
bool isRejectUpAtrLower;
|
||||
bool isRejectDownAtrLower;
|
||||
|
||||
//
|
||||
bool isBreakUpATRUpper;
|
||||
bool isBreakDownATRUpper;
|
||||
bool isBreakUpAtrUpper;
|
||||
bool isBreakDownAtrUpper;
|
||||
|
||||
//
|
||||
bool isBreakUpATRLower;
|
||||
bool isBreakDownATRLower;
|
||||
bool isBreakUpAtrLower;
|
||||
bool isBreakDownAtrLower;
|
||||
|
||||
//
|
||||
// bool isCloseLower
|
||||
@@ -283,41 +283,41 @@ struct X121XATRConditions
|
||||
// RSI ...
|
||||
|
||||
//
|
||||
isRSIOverBought = false;
|
||||
isRSICrossedOverOverBought = false;
|
||||
isRSICrossedUnderOverBought = false;
|
||||
isRsiOverBought = false;
|
||||
isRsiCrossedOverOverBought = false;
|
||||
isRsiCrossedUnderOverBought = false;
|
||||
|
||||
//
|
||||
isRSIOverSold = false;
|
||||
isRSICrossedUnderOverSold = false;
|
||||
isRSICrossedOverOverSold = false;
|
||||
isRsiOverSold = false;
|
||||
isRsiCrossedUnderOverSold = false;
|
||||
isRsiCrossedOverOverSold = false;
|
||||
|
||||
//
|
||||
// ATR ...
|
||||
|
||||
//
|
||||
isCloseOverATRUpper = false;
|
||||
isCloseOverATRLower = false;
|
||||
isCloseOverAtrUpper = false;
|
||||
isCloseOverAtrLower = false;
|
||||
|
||||
//
|
||||
isCloseUnderATRUpper = false;
|
||||
isCloseUnderATRLower = false;
|
||||
isCloseUnderAtrUpper = false;
|
||||
isCloseUnderAtrLower = false;
|
||||
|
||||
//
|
||||
isRejectUpATRUpper = false;
|
||||
isRejectDownATRUpper = false;
|
||||
isRejectUpAtrUpper = false;
|
||||
isRejectDownAtrUpper = false;
|
||||
|
||||
//
|
||||
isRejectUpATRLower = false;
|
||||
isRejectDownATRLower = false;
|
||||
isRejectUpAtrLower = false;
|
||||
isRejectDownAtrLower = false;
|
||||
|
||||
//
|
||||
isBreakUpATRUpper = false;
|
||||
isBreakDownATRUpper = false;
|
||||
isBreakUpAtrUpper = false;
|
||||
isBreakDownAtrUpper = false;
|
||||
|
||||
//
|
||||
isBreakUpATRLower = false;
|
||||
isBreakDownATRLower = false;
|
||||
isBreakUpAtrLower = false;
|
||||
isBreakDownAtrLower = false;
|
||||
|
||||
//
|
||||
// XDON ...
|
||||
@@ -394,26 +394,26 @@ struct X121XATRConditions
|
||||
string conditionsStr =
|
||||
//
|
||||
// RSI ...
|
||||
ToString("isRSIOverBought", isRSIOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRSICrossedOverOverBought", isRSICrossedOverOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRSICrossedUnderOverBought", isRSICrossedUnderOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRSIOverSold", isRSIOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRSICrossedUnderOverSold", isRSICrossedUnderOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRSICrossedOverOverSold", isRSICrossedOverOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiOverBought", isRsiOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiCrossedOverOverBought", isRsiCrossedOverOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiCrossedUnderOverBought", isRsiCrossedUnderOverBought, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiOverSold", isRsiOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiCrossedUnderOverSold", isRsiCrossedUnderOverSold, ignoreFalseConditions, separator) +
|
||||
ToString("isRsiCrossedOverOverSold", isRsiCrossedOverOverSold, ignoreFalseConditions, separator) +
|
||||
//
|
||||
// ATR ...
|
||||
ToString("isCloseOverATRUpper", isCloseOverATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseOverATRLower", isCloseOverATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseUnderATRUpper", isCloseUnderATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseUnderATRLower", isCloseUnderATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectUpATRUpper", isRejectUpATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDownATRUpper", isRejectDownATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectUpATRLower", isRejectUpATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDownATRLower", isRejectDownATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakUpATRUpper", isBreakUpATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakDownATRUpper", isBreakDownATRUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakUpATRLower", isBreakUpATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakDownATRLower", isBreakDownATRLower, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseOverAtrUpper", isCloseOverAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseOverAtrLower", isCloseOverAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseUnderAtrUpper", isCloseUnderAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isCloseUnderAtrLower", isCloseUnderAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectUpAtrUpper", isRejectUpAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDownAtrUpper", isRejectDownAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectUpAtrLower", isRejectUpAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isRejectDownAtrLower", isRejectDownAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakUpAtrUpper", isBreakUpAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakDownAtrUpper", isBreakDownAtrUpper, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakUpAtrLower", isBreakUpAtrLower, ignoreFalseConditions, separator) +
|
||||
ToString("isBreakDownAtrLower", isBreakDownAtrLower, ignoreFalseConditions, separator) +
|
||||
//
|
||||
""
|
||||
//
|
||||
@@ -999,56 +999,56 @@ class XCX121XATRHelper : public XCBaseHelper
|
||||
// RSI ...
|
||||
|
||||
//
|
||||
bool isRSIOverBought = conditions.rsiBuffer[cIDX] > mInputs.rsiOverBoughtLevel;
|
||||
bool isRSIOverBoughtPrev = conditions.rsiBuffer[pIDX] > mInputs.rsiOverBoughtLevel;
|
||||
bool isRsiOverBought = conditions.rsiBuffer[cIDX] > mInputs.rsiOverBoughtLevel;
|
||||
bool isRsiOverBoughtPrev = conditions.rsiBuffer[pIDX] > mInputs.rsiOverBoughtLevel;
|
||||
|
||||
//
|
||||
bool isRSICrossedOverOverBought = isRSIOverBought &&
|
||||
!isRSIOverBoughtPrev;
|
||||
bool isRSICrossedUnderOverBought = !isRSIOverBought &&
|
||||
isRSIOverBoughtPrev;
|
||||
bool isRsiCrossedOverOverBought = isRsiOverBought &&
|
||||
!isRsiOverBoughtPrev;
|
||||
bool isRsiCrossedUnderOverBought = !isRsiOverBought &&
|
||||
isRsiOverBoughtPrev;
|
||||
|
||||
//
|
||||
bool isRSIOverSold = conditions.rsiBuffer[cIDX] < mInputs.rsiOverSoldLevel;
|
||||
bool isRSIOverSoldPrev = conditions.rsiBuffer[pIDX] < mInputs.rsiOverSoldLevel;
|
||||
bool isRsiOverSold = conditions.rsiBuffer[cIDX] < mInputs.rsiOverSoldLevel;
|
||||
bool isRsiOverSoldPrev = conditions.rsiBuffer[pIDX] < mInputs.rsiOverSoldLevel;
|
||||
|
||||
//
|
||||
bool isRSICrossedUnderOverSold = isRSIOverSold &&
|
||||
!isRSIOverSoldPrev;
|
||||
bool isRSICrossedOverOverSold = !isRSIOverSold &&
|
||||
isRSIOverSoldPrev;
|
||||
bool isRsiCrossedUnderOverSold = isRsiOverSold &&
|
||||
!isRsiOverSoldPrev;
|
||||
bool isRsiCrossedOverOverSold = !isRsiOverSold &&
|
||||
isRsiOverSoldPrev;
|
||||
|
||||
//
|
||||
// ATR ...
|
||||
|
||||
//
|
||||
bool isCloseOverATRUpper = cBar.close > conditions.atrUpperBuffer[cIDX];
|
||||
bool isCloseOverATRLower = cBar.close > conditions.atrLowerBuffer[cIDX];
|
||||
bool isCloseOverAtrUpper = cBar.close > conditions.atrUpperBuffer[cIDX];
|
||||
bool isCloseOverAtrLower = cBar.close > conditions.atrLowerBuffer[cIDX];
|
||||
|
||||
//
|
||||
bool isCloseUnderATRUpper = cBar.close < conditions.atrUpperBuffer[cIDX];
|
||||
bool isCloseUnderATRLower = cBar.close < conditions.atrLowerBuffer[cIDX];
|
||||
bool isCloseUnderAtrUpper = cBar.close < conditions.atrUpperBuffer[cIDX];
|
||||
bool isCloseUnderAtrLower = cBar.close < conditions.atrLowerBuffer[cIDX];
|
||||
|
||||
//
|
||||
bool isRejectUpATRUpper = IsBarReject(
|
||||
bool isRejectUpAtrUpper = IsBarReject(
|
||||
atrUpperBuffer[cIDX],
|
||||
X_DIRECTION_BULLISH,
|
||||
cBar //
|
||||
);
|
||||
bool isRejectDownATRUpper = IsBarReject(
|
||||
bool isRejectDownAtrUpper = IsBarReject(
|
||||
atrUpperBuffer[cIDX],
|
||||
X_DIRECTION_BEARISH,
|
||||
cBar //
|
||||
);
|
||||
|
||||
//
|
||||
bool isRejectUpATRLower = IsBarReject(
|
||||
bool isRejectUpAtrLower = IsBarReject(
|
||||
atrLowerBuffer[cIDX],
|
||||
X_DIRECTION_BULLISH,
|
||||
cBar //
|
||||
);
|
||||
;
|
||||
bool isRejectDownATRLower = IsBarReject(
|
||||
bool isRejectDownAtrLower = IsBarReject(
|
||||
atrLowerBuffer[cIDX],
|
||||
X_DIRECTION_BEARISH,
|
||||
cBar //
|
||||
@@ -1056,48 +1056,48 @@ class XCX121XATRHelper : public XCBaseHelper
|
||||
;
|
||||
|
||||
//
|
||||
bool isBreakUpATRUpper = IsBarBreak(
|
||||
bool isBreakUpAtrUpper = IsBarBreak(
|
||||
atrUpperBuffer[cIDX],
|
||||
X_DIRECTION_BULLISH,
|
||||
cBar //
|
||||
);
|
||||
bool isBreakDownATRUpper = IsBarBreak(
|
||||
bool isBreakDownAtrUpper = IsBarBreak(
|
||||
atrUpperBuffer[cIDX],
|
||||
X_DIRECTION_BEARISH,
|
||||
cBar //
|
||||
);
|
||||
|
||||
//
|
||||
bool isBreakUpATRLower = IsBarBreak(
|
||||
bool isBreakUpAtrLower = IsBarBreak(
|
||||
atrLowerBuffer[cIDX],
|
||||
X_DIRECTION_BULLISH,
|
||||
cBar //
|
||||
);
|
||||
bool isBreakDownATRLower = IsBarBreak(
|
||||
bool isBreakDownAtrLower = IsBarBreak(
|
||||
atrLowerBuffer[cIDX],
|
||||
X_DIRECTION_BEARISH,
|
||||
cBar //
|
||||
);
|
||||
|
||||
//
|
||||
conditions.isRSIOverSold = isRSIOverSold;
|
||||
conditions.isRSIOverBought = isRSIOverBought;
|
||||
conditions.isRejectUpATRUpper = isRejectUpATRUpper;
|
||||
conditions.isRejectUpATRLower = isRejectUpATRLower;
|
||||
conditions.isBreakUpATRUpper = isBreakUpATRUpper;
|
||||
conditions.isBreakUpATRLower = isBreakUpATRLower;
|
||||
conditions.isRejectDownATRUpper = isRejectDownATRUpper;
|
||||
conditions.isRejectDownATRLower = isRejectDownATRLower;
|
||||
conditions.isCloseOverATRUpper = isCloseOverATRUpper;
|
||||
conditions.isCloseOverATRLower = isCloseOverATRLower;
|
||||
conditions.isBreakDownATRUpper = isBreakDownATRUpper;
|
||||
conditions.isBreakDownATRLower = isBreakDownATRLower;
|
||||
conditions.isCloseUnderATRUpper = isCloseUnderATRUpper;
|
||||
conditions.isCloseUnderATRLower = isCloseUnderATRLower;
|
||||
conditions.isRSICrossedOverOverSold = isRSICrossedOverOverSold;
|
||||
conditions.isRSICrossedUnderOverSold = isRSICrossedUnderOverSold;
|
||||
conditions.isRSICrossedOverOverBought = isRSICrossedOverOverBought;
|
||||
conditions.isRSICrossedUnderOverBought = isRSICrossedUnderOverBought;
|
||||
conditions.isRsiOverSold = isRsiOverSold;
|
||||
conditions.isRsiOverBought = isRsiOverBought;
|
||||
conditions.isRejectUpAtrUpper = isRejectUpAtrUpper;
|
||||
conditions.isRejectUpAtrLower = isRejectUpAtrLower;
|
||||
conditions.isBreakUpAtrUpper = isBreakUpAtrUpper;
|
||||
conditions.isBreakUpAtrLower = isBreakUpAtrLower;
|
||||
conditions.isRejectDownAtrUpper = isRejectDownAtrUpper;
|
||||
conditions.isRejectDownAtrLower = isRejectDownAtrLower;
|
||||
conditions.isCloseOverAtrUpper = isCloseOverAtrUpper;
|
||||
conditions.isCloseOverAtrLower = isCloseOverAtrLower;
|
||||
conditions.isBreakDownAtrUpper = isBreakDownAtrUpper;
|
||||
conditions.isBreakDownAtrLower = isBreakDownAtrLower;
|
||||
conditions.isCloseUnderAtrUpper = isCloseUnderAtrUpper;
|
||||
conditions.isCloseUnderAtrLower = isCloseUnderAtrLower;
|
||||
conditions.isRsiCrossedOverOverSold = isRsiCrossedOverOverSold;
|
||||
conditions.isRsiCrossedUnderOverSold = isRsiCrossedUnderOverSold;
|
||||
conditions.isRsiCrossedOverOverBought = isRsiCrossedOverOverBought;
|
||||
conditions.isRsiCrossedUnderOverBought = isRsiCrossedUnderOverBought;
|
||||
|
||||
//
|
||||
return result;
|
||||
|
||||
@@ -743,6 +743,59 @@ class XCX121XSTRHelper : public XCBaseHelper
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
double GetLastSTR(
|
||||
ENUM_X_DIRECTION dir,
|
||||
int barIndex = 0 //
|
||||
)
|
||||
{
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
if (barIndex < 0)
|
||||
{
|
||||
barIndex = 0;
|
||||
}
|
||||
|
||||
//
|
||||
if (!HasDirection(dir))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int index = barIndex;
|
||||
bool isBullish = IsBullish(dir);
|
||||
|
||||
//
|
||||
bool canContinue = true;
|
||||
while (canContinue)
|
||||
{
|
||||
//
|
||||
double iStr = GetSTR(index);
|
||||
double iState = GetSTRState(index);
|
||||
|
||||
//
|
||||
canContinue =
|
||||
isBullish
|
||||
? iState < 0
|
||||
: iState > 0;
|
||||
if (!canContinue)
|
||||
{
|
||||
//
|
||||
result = iStr;
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
index++;
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool GetConditions(
|
||||
X121XSTRConditions &conditions, //
|
||||
|
||||
@@ -676,12 +676,12 @@ bool DetectX121SMCXOBGPVSiganlTrigger(
|
||||
double isNewDecisionVale = decisionConditions.x121Conditions.isNewVale;
|
||||
|
||||
//
|
||||
bool isTriggerRSICrossedOverOverSold = triggerConditions.x121Conditions.isRSICrossedOverOverSold;
|
||||
bool isTriggerRSICrossedUnderOverBought = triggerConditions.x121Conditions.isRSICrossedUnderOverBought;
|
||||
bool isTriggerRSICrossedOverOverSold = triggerConditions.x121Conditions.isRsiCrossedOverOverSold;
|
||||
bool isTriggerRSICrossedUnderOverBought = triggerConditions.x121Conditions.isRsiCrossedUnderOverBought;
|
||||
|
||||
//
|
||||
bool isDecisionRSICrossedOverOverSold = decisionConditions.x121Conditions.isRSICrossedOverOverSold;
|
||||
bool isDecisionRSICrossedUnderOverBought = decisionConditions.x121Conditions.isRSICrossedUnderOverBought;
|
||||
bool isDecisionRSICrossedOverOverSold = decisionConditions.x121Conditions.isRsiCrossedOverOverSold;
|
||||
bool isDecisionRSICrossedUnderOverBought = decisionConditions.x121Conditions.isRsiCrossedUnderOverBought;
|
||||
|
||||
//
|
||||
// Waits For Price to Go Inside FVG ...
|
||||
|
||||
@@ -50,6 +50,7 @@ struct X121SMCStrategyXOBSPVSignalConditions
|
||||
|
||||
//
|
||||
double pivot;
|
||||
XPriceZones priceZone;
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
@@ -167,6 +168,9 @@ struct X121SMCStrategyXOBSPVSignalConditions
|
||||
{
|
||||
//
|
||||
pivot = 0;
|
||||
|
||||
//
|
||||
priceZone.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -408,169 +412,213 @@ bool DetectX121SMCXOBSPVSiganlSetup(
|
||||
}
|
||||
|
||||
//
|
||||
bool isStrSwitchedToBullish = analyseConditions.x121Conditions.isStrSwitchedToBullish;
|
||||
bool isStrSwitchedToBearish = analyseConditions.x121Conditions.isStrSwitchedToBearish;
|
||||
double decisionPeak = decisionConditions.x121Conditions.peaksBuffer[1];
|
||||
double decisionVale = decisionConditions.x121Conditions.valesBuffer[1];
|
||||
|
||||
//
|
||||
if (isStrSwitchedToBullish ||
|
||||
isStrSwitchedToBearish)
|
||||
// Find Price Inside Zone ...
|
||||
XPriceZones priceZone = conditions.priceZone;
|
||||
bool hasPriceZones = conditions.priceZone.IsValid();
|
||||
if (!hasPriceZones)
|
||||
{
|
||||
Print("Str State Changed ...");
|
||||
//
|
||||
hasPriceZones = CalculatePriceInsideZones(
|
||||
priceZone,
|
||||
analyseState,
|
||||
cBar //
|
||||
);
|
||||
|
||||
//
|
||||
if (hasPriceZones)
|
||||
{
|
||||
//
|
||||
// Validate Price Zone ...
|
||||
double upper = 0;
|
||||
double lower = 0;
|
||||
hasPriceZones = priceZone.GetBoundary(
|
||||
X_DIRECTION_ALL,
|
||||
upper,
|
||||
lower //
|
||||
);
|
||||
result = hasPriceZones;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isValid = decisionPeak <= upper ||
|
||||
decisionVale >= lower;
|
||||
hasPriceZones = isValid;
|
||||
result = hasPriceZones;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
conditions.priceZone = priceZone;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
X121SMCCycleConditions conditionState = consolidationConditions;
|
||||
X121SMCCycleConditions conditionStatePrev = consolidationConditionsPrev;
|
||||
// Detect Str Change Direction ...
|
||||
|
||||
//
|
||||
XOHCL cCBar;
|
||||
result = cCBar.Init(
|
||||
conditionState.symbol,
|
||||
conditionState.period,
|
||||
cIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
bool isDecisionSarBullish = decisionConditions.x121Conditions.isSarBullish;
|
||||
bool isDecisionSarBearish = decisionConditions.x121Conditions.isSarBearish;
|
||||
|
||||
//
|
||||
XOHCL cPBar;
|
||||
result = cCBar.GetPreviousBar(cPBar);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
bool isDecisionStrBullish = decisionConditions.x121Conditions.isStrBullish;
|
||||
bool isDecisionStrBearish = decisionConditions.x121Conditions.isStrBearish;
|
||||
|
||||
//
|
||||
// Engulf ...
|
||||
ENUM_X_DIRECTION cCBarEngulfDir;
|
||||
bool isCCBarEngulfed = consolidationCycleHelper
|
||||
.mBarAnalyser
|
||||
.IsEngulfBar(
|
||||
cCBar,
|
||||
cCBarEngulfDir,
|
||||
0 // Extended ...
|
||||
);
|
||||
bool isCCBarBullishEngulfed =
|
||||
isCCBarEngulfed &&
|
||||
IsBullish(cCBarEngulfDir);
|
||||
bool isCCBarBearishEngulfed =
|
||||
isCCBarEngulfed &&
|
||||
IsBearish(cCBarEngulfDir);
|
||||
bool isDecisionSarCrossedOverVale = decisionConditions.x121Conditions.isSarCrossedOverVale;
|
||||
bool isDecisionSarCrossedUnderPeak = decisionConditions.x121Conditions.isSarCrossedUnderPeak;
|
||||
|
||||
//
|
||||
// Momentum ...
|
||||
ENUM_X_DIRECTION cCBarMomentumDir;
|
||||
bool isCCBarMomentum = consolidationCycleHelper
|
||||
.mBarAnalyser
|
||||
.IsMomentumBar(
|
||||
cCBar,
|
||||
cCBarMomentumDir,
|
||||
1 // Extended ...
|
||||
);
|
||||
bool isCCBarBullishMomentum =
|
||||
isCCBarMomentum &&
|
||||
IsBullish(cCBarMomentumDir);
|
||||
bool isCCBarBearishMomentum =
|
||||
isCCBarMomentum &&
|
||||
IsBearish(cCBarMomentumDir);
|
||||
bool isDecisionStrCrossedOverVale = decisionConditions.x121Conditions.isStrCrossedOverVale;
|
||||
bool isDecisionStrCrossedUnderPeak = decisionConditions.x121Conditions.isStrCrossedUnderPeak;
|
||||
|
||||
//
|
||||
// Reject ...
|
||||
ENUM_X_DIRECTION cCBarRejectDir;
|
||||
bool isCCBarRejected = consolidationCycleHelper
|
||||
.mBarAnalyser
|
||||
.IsRejectionBar(
|
||||
cCBar,
|
||||
cCBarRejectDir,
|
||||
1 // Extended ...
|
||||
);
|
||||
bool isCCBarBullishRejected =
|
||||
isCCBarRejected &&
|
||||
IsBullish(cCBarRejectDir);
|
||||
bool isCCBarBearishRejected =
|
||||
isCCBarRejected &&
|
||||
IsBearish(cCBarRejectDir);
|
||||
bool isDecisionPeakOverAtrUpper = decisionConditions.x121Conditions.isPeakOverAtrUpper;
|
||||
bool isDecisionValeUnderAtrLower = decisionConditions.x121Conditions.isValeUnderAtrLower;
|
||||
|
||||
//
|
||||
// Bar Checking Summary ...
|
||||
bool isDecisionVWapBullishState = decisionConditions.x121Conditions.isVWapBullishState;
|
||||
bool isDecisionVWapSwitchedToBullishState = decisionConditions.x121Conditions.isVWapSwitchedToBullishState;
|
||||
|
||||
//
|
||||
// Bullish ...
|
||||
bool isCCBarPassedBullish =
|
||||
//
|
||||
isCCBarBullishEngulfed ||
|
||||
isCCBarBullishMomentum ||
|
||||
isCCBarBullishRejected
|
||||
//
|
||||
;
|
||||
bool isDecisionVWapBullishOrdered = decisionConditions.x121Conditions.isVWapBullishOrdered;
|
||||
bool isDecisionVWapSwitchedToBullishOrdered = decisionConditions.x121Conditions.isVWapSwitchedToBullishOrdered;
|
||||
|
||||
//
|
||||
// Bearish ...
|
||||
bool isCCBarPassedBearish =
|
||||
//
|
||||
isCCBarBearishEngulfed ||
|
||||
isCCBarBearishMomentum ||
|
||||
isCCBarBearishRejected
|
||||
//
|
||||
;
|
||||
bool isDecisionVWapBearishState = decisionConditions.x121Conditions.isVWapBearishState;
|
||||
bool isDecisionVWapSwitchedToBearishState = decisionConditions.x121Conditions.isVWapSwitchedToBearishState;
|
||||
|
||||
//
|
||||
double cPeakPrev = conditionStatePrev.x121Conditions.peaksBuffer[0];
|
||||
double cValePrev = conditionStatePrev.x121Conditions.valesBuffer[0];
|
||||
bool isDecisionVWapBearishOrdered = decisionConditions.x121Conditions.isVWapBearishOrdered;
|
||||
bool isDecisionVWapSwitchedToBearishOrdered = decisionConditions.x121Conditions.isVWapSwitchedToBearishOrdered;
|
||||
|
||||
//
|
||||
double cPeak = conditionState.x121Conditions.peaksBuffer[1];
|
||||
double cVale = conditionState.x121Conditions.valesBuffer[1];
|
||||
bool isDecisionStrUpperOverPeak = decisionConditions.x121Conditions.isStrUpperOverPeak;
|
||||
bool isDecisionStrLowerOverVale = decisionConditions.x121Conditions.isStrLowerOverVale;
|
||||
|
||||
//
|
||||
bool isCPeakSame = cPeak == cPeakPrev;
|
||||
bool isCValeSame = cVale == cValePrev;
|
||||
bool isDecisionStrUpperUnderPeak = decisionConditions.x121Conditions.isStrUpperUnderPeak;
|
||||
bool isDecisionStrLowerUnderVale = decisionConditions.x121Conditions.isStrLowerUnderVale;
|
||||
|
||||
//
|
||||
bool isCNewPeakPrev = conditionStatePrev.x121Conditions.isNewPeak;
|
||||
bool isCNewPeakOverLastPrev = conditionStatePrev.x121Conditions.isNewPeakOverLast;
|
||||
bool isCNewPeakUnderLastPrev = conditionStatePrev.x121Conditions.isNewPeakUnderLast;
|
||||
bool isDecisionDonLowUpperLesserThanDonCloseUpper =
|
||||
decisionConditions.x121Conditions.donLowUpperBuffer[1] <
|
||||
decisionConditions.x121Conditions.donCloseUpperBuffer[1];
|
||||
|
||||
//
|
||||
bool isCNewValePrev = conditionStatePrev.x121Conditions.isNewVale;
|
||||
bool isCNewValeOverLastPrev = conditionStatePrev.x121Conditions.isNewValeOverLast;
|
||||
bool isCNewValeUnderLastPrev = conditionStatePrev.x121Conditions.isNewValeUnderLast;
|
||||
bool isDecisionDonHighLowerGreaterThanDonCloseLower =
|
||||
decisionConditions.x121Conditions.donHighLowerBuffer[1] <
|
||||
decisionConditions.x121Conditions.donCloseLowerBuffer[1];
|
||||
|
||||
//
|
||||
bool isCRSIOverSold = conditionState.x121Conditions.isRSIOverSold;
|
||||
bool isCRSICrossedOverOverSold = conditionState.x121Conditions.isRSICrossedOverOverSold;
|
||||
bool isCRSICrossedUnderOverSold = conditionState.x121Conditions.isRSICrossedUnderOverSold;
|
||||
|
||||
//
|
||||
bool isCRSIOverBought = conditionState.x121Conditions.isRSIOverBought;
|
||||
bool isCRSICrossedOverOverBought = conditionState.x121Conditions.isRSICrossedOverOverBought;
|
||||
bool isCRSICrossedUnderOverBought = conditionState.x121Conditions.isRSICrossedUnderOverBought;
|
||||
|
||||
//
|
||||
bool isCRSIOverSoldPrev = conditionStatePrev.x121Conditions.isRSIOverSold;
|
||||
bool isCRSICrossedOverOverSoldPrev = conditionStatePrev.x121Conditions.isRSICrossedOverOverSold;
|
||||
bool isCRSICrossedUnderOverSoldPrev = conditionStatePrev.x121Conditions.isRSICrossedUnderOverSold;
|
||||
|
||||
//
|
||||
bool isCRSIOverBoughtPrev = conditionStatePrev.x121Conditions.isRSIOverBought;
|
||||
bool isCRSICrossedOverOverBoughtPrev = conditionStatePrev.x121Conditions.isRSICrossedOverOverBought;
|
||||
bool isCRSICrossedUnderOverBoughtPrev = conditionStatePrev.x121Conditions.isRSICrossedUnderOverBought;
|
||||
// Summarize Conditions ...
|
||||
|
||||
//
|
||||
isBullish =
|
||||
//
|
||||
isCNewValePrev &&
|
||||
isCCBarPassedBullish
|
||||
isDecisionValeUnderAtrLower
|
||||
//
|
||||
&&
|
||||
//
|
||||
isDecisionDonHighLowerGreaterThanDonCloseLower
|
||||
//
|
||||
&&
|
||||
//
|
||||
(
|
||||
//
|
||||
isDecisionVWapBullishState ||
|
||||
isDecisionVWapBullishOrdered
|
||||
//
|
||||
)
|
||||
//
|
||||
&&
|
||||
//
|
||||
(
|
||||
//
|
||||
isDecisionStrUpperOverPeak ||
|
||||
isDecisionStrLowerOverVale
|
||||
//
|
||||
)
|
||||
//
|
||||
&&
|
||||
//
|
||||
(
|
||||
//
|
||||
(
|
||||
//
|
||||
isDecisionStrBullish &&
|
||||
isDecisionSarCrossedOverVale
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
isDecisionSarBullish &&
|
||||
isDecisionStrCrossedOverVale
|
||||
//
|
||||
)
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
isBearish =
|
||||
//
|
||||
isCNewPeakPrev &&
|
||||
isCCBarPassedBearish
|
||||
isDecisionPeakOverAtrUpper
|
||||
//
|
||||
&&
|
||||
//
|
||||
isDecisionDonLowUpperLesserThanDonCloseUpper
|
||||
//
|
||||
&&
|
||||
//
|
||||
(
|
||||
//
|
||||
isDecisionVWapBearishState ||
|
||||
isDecisionVWapBearishOrdered
|
||||
//
|
||||
)
|
||||
//
|
||||
&&
|
||||
//
|
||||
(
|
||||
//
|
||||
isDecisionStrUpperUnderPeak ||
|
||||
isDecisionStrLowerUnderVale
|
||||
//
|
||||
)
|
||||
//
|
||||
&&
|
||||
//
|
||||
(
|
||||
//
|
||||
(
|
||||
//
|
||||
isDecisionStrBearish &&
|
||||
isDecisionSarCrossedUnderPeak
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
isDecisionSarBearish &&
|
||||
isDecisionStrCrossedUnderPeak //
|
||||
)
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
@@ -582,12 +630,6 @@ bool DetectX121SMCXOBSPVSiganlSetup(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
conditions.pivot =
|
||||
isBullish
|
||||
? conditionState.x121Conditions.valesBuffer[1]
|
||||
: conditionState.x121Conditions.peaksBuffer[1];
|
||||
|
||||
//
|
||||
conditions.setupTime = cTime;
|
||||
conditions.dir =
|
||||
@@ -615,7 +657,7 @@ bool DetectX121SMCXOBSPVSiganlTrigger(
|
||||
XC121SMCCycleHelper *consolidationCycleHelper,
|
||||
XC121SMCCycleHelper *visionCycleHelper,
|
||||
//
|
||||
int maxAllowedSetupAge = 576 //
|
||||
int maxAllowedSetupAge = 60 //
|
||||
//
|
||||
)
|
||||
{
|
||||
@@ -817,25 +859,29 @@ bool DetectX121SMCXOBSPVSiganlTrigger(
|
||||
// Trigger Conditions ...
|
||||
|
||||
//
|
||||
// Looking for STR Direction Change ...
|
||||
double decisionLastBullishStr = decisionCycleHelper.mX121Helper.xstrHelper.GetLastSTR(X_DIRECTION_BULLISH);
|
||||
double decisionLastBearishStr = decisionCycleHelper.mX121Helper.xstrHelper.GetLastSTR(X_DIRECTION_BEARISH);
|
||||
|
||||
//
|
||||
bool isStrSwitchedToBullish = analyseConditions.x121Conditions.isStrSwitchedToBullish;
|
||||
bool isStrSwitchedToBearish = analyseConditions.x121Conditions.isStrSwitchedToBearish;
|
||||
bool isDecisionLastBearishStrBreakedUp = IsBarBreak(
|
||||
decisionLastBearishStr,
|
||||
X_DIRECTION_BULLISH,
|
||||
cBar //
|
||||
);
|
||||
|
||||
//
|
||||
result = isStrSwitchedToBullish ||
|
||||
isStrSwitchedToBearish;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
bool isDecisionLastBullishStrBreakedDown = IsBarBreak(
|
||||
decisionLastBullishStr,
|
||||
X_DIRECTION_BEARISH,
|
||||
cBar //
|
||||
);
|
||||
|
||||
//
|
||||
// Detect Bullish Conditions ...
|
||||
isBullish =
|
||||
//
|
||||
false
|
||||
isBullish &&
|
||||
isDecisionLastBearishStrBreakedUp
|
||||
//
|
||||
;
|
||||
|
||||
@@ -843,7 +889,8 @@ bool DetectX121SMCXOBSPVSiganlTrigger(
|
||||
// Detect Bearish Conditions ...
|
||||
isBearish =
|
||||
//
|
||||
false
|
||||
isBearish &&
|
||||
isDecisionLastBullishStrBreakedDown
|
||||
//
|
||||
;
|
||||
|
||||
@@ -854,6 +901,13 @@ bool DetectX121SMCXOBSPVSiganlTrigger(
|
||||
{
|
||||
//
|
||||
// Cleanup Setup Conditions ...
|
||||
int setupAge = conditions.GetSetupAge();
|
||||
if (IsValidSize(setupAge) &&
|
||||
IsValidSize(maxAllowedSetupAge) &&
|
||||
setupAge >= maxAllowedSetupAge)
|
||||
{
|
||||
conditions.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -899,15 +953,15 @@ bool DetectX121SMCXOBSPVSiganlTrigger(
|
||||
double sls[];
|
||||
|
||||
//
|
||||
double atr = triggerConditions.x121Conditions.atrBuffer[1];
|
||||
double peak = triggerConditions.x121Conditions.peaksBuffer[1];
|
||||
double vale = triggerConditions.x121Conditions.valesBuffer[1];
|
||||
double iAtr = triggerConditions.x121Conditions.atrBuffer[1];
|
||||
double iPeak = triggerConditions.x121Conditions.peaksBuffer[1];
|
||||
double iVale = triggerConditions.x121Conditions.valesBuffer[1];
|
||||
|
||||
//
|
||||
if (isBullish)
|
||||
{
|
||||
//
|
||||
double lowerVale = triggerCycleHelper.mX121Helper.xpvHelper.GetLowerVale(vale);
|
||||
double lowerVale = triggerCycleHelper.mX121Helper.xpvHelper.GetLowerVale(iVale);
|
||||
if (lowerVale > 0)
|
||||
{
|
||||
//
|
||||
@@ -919,14 +973,14 @@ bool DetectX121SMCXOBSPVSiganlTrigger(
|
||||
|
||||
//
|
||||
Add(
|
||||
vale,
|
||||
iVale,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
else if (isBearish)
|
||||
{
|
||||
//
|
||||
double higherPeak = triggerCycleHelper.mX121Helper.xpvHelper.GetHigherPeak(peak);
|
||||
double higherPeak = triggerCycleHelper.mX121Helper.xpvHelper.GetHigherPeak(iPeak);
|
||||
if (higherPeak > 0)
|
||||
{
|
||||
//
|
||||
@@ -938,7 +992,7 @@ bool DetectX121SMCXOBSPVSiganlTrigger(
|
||||
|
||||
//
|
||||
Add(
|
||||
peak,
|
||||
iPeak,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
@@ -949,8 +1003,8 @@ bool DetectX121SMCXOBSPVSiganlTrigger(
|
||||
|
||||
//
|
||||
double sl = isBullish
|
||||
? slsMin - atr
|
||||
: slsMax + atr;
|
||||
? slsMin - iAtr
|
||||
: slsMax + iAtr;
|
||||
double risk = MathAbs(entry - sl);
|
||||
double targetDelta = 2 * (risk / 3);
|
||||
if (target == 0)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -185,7 +185,7 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
|
||||
//
|
||||
bool useTestSignal = false;
|
||||
bool useXOBGPVSignal = false;
|
||||
bool useXOBGPVSignal = true;
|
||||
bool useXOBSPVSignal = true;
|
||||
|
||||
//
|
||||
@@ -874,58 +874,6 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
X121SMCStrategyXOBSPVSignalConditions mConditions;
|
||||
for (int i = 0; i < conditionsCount; i++)
|
||||
{
|
||||
//
|
||||
// Update Conditions ...
|
||||
// mTmpConditions[i].UpdateOrderBlocks();
|
||||
|
||||
//
|
||||
// Retrieve Required Data ...
|
||||
// ENUM_X_DIRECTION iDir = mTmpConditions[i].dir;
|
||||
// bool isIBullish = IsBullish(iDir);
|
||||
// double iUpper = 0;
|
||||
// double iLower = 0;
|
||||
// bool iHasBoundary = mTmpConditions[i].fvgOB.GetBoundary(
|
||||
// iUpper,
|
||||
// iLower //
|
||||
// );
|
||||
// if (!iHasBoundary)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
//
|
||||
// Draw Conditions ...
|
||||
|
||||
//
|
||||
// XFVGOrderBlock iFVGOB = mTmpConditions[i].fvgOB;
|
||||
// XCBaseObject *drawnObjects[];
|
||||
// mPOIDrawer.DrawFVGOrderBlock(
|
||||
// iFVGOB,
|
||||
// drawnObjects //
|
||||
// );
|
||||
// AddObjectsIfNotExists(drawnObjects);
|
||||
|
||||
//
|
||||
// Check Broken Order Blocks and Remove them ...
|
||||
// bool isBreaked =
|
||||
// isBullish
|
||||
// ? (cBar.high < iLower ||
|
||||
// pBar.high < iLower)
|
||||
// : (cBar.low > iUpper ||
|
||||
// cBar.low > iUpper);
|
||||
// if (isBreaked)
|
||||
// {
|
||||
// //
|
||||
// ArrayRemove(
|
||||
// mXOBSPVConditionsCollection,
|
||||
// i,
|
||||
// 1 //
|
||||
// );
|
||||
|
||||
// //
|
||||
// continue;
|
||||
// }
|
||||
|
||||
//
|
||||
// Check Triggers ...
|
||||
bool canTrigger = mTmpConditions[i].CanTrigger();
|
||||
@@ -950,6 +898,17 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
result = canTrigger;
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
bool isISetuped = mTmpConditions[i].IsSetuped();
|
||||
if (!isISetuped)
|
||||
{
|
||||
//
|
||||
ArrayRemove(
|
||||
mXOBSPVConditionsCollection,
|
||||
i,
|
||||
1 //
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1057,7 +1016,7 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
x121Inputs.Default();
|
||||
|
||||
//
|
||||
x121Inputs.showRSI = true;
|
||||
x121Inputs.showRSI = false;
|
||||
|
||||
//
|
||||
bool isInited = false;
|
||||
@@ -1082,27 +1041,27 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
|
||||
//
|
||||
// XATR ...
|
||||
x121Inputs.xatrInputs.showATRUpper = true;
|
||||
x121Inputs.xatrInputs.showATRLower = true;
|
||||
x121Inputs.xatrInputs.showATRUpper = false;
|
||||
x121Inputs.xatrInputs.showATRLower = false;
|
||||
|
||||
//
|
||||
// XSTR ...
|
||||
x121Inputs.xstrInputs.showStr = true;
|
||||
x121Inputs.xstrInputs.showStrUpper = true;
|
||||
x121Inputs.xstrInputs.showStrLower = true;
|
||||
x121Inputs.xstrInputs.showStrUpper = false;
|
||||
x121Inputs.xstrInputs.showStrLower = false;
|
||||
|
||||
//
|
||||
// XDON ...
|
||||
x121Inputs.xdonInputs.showOpen = false;
|
||||
x121Inputs.xdonInputs.showClose = false;
|
||||
x121Inputs.xdonInputs.showLow = false;
|
||||
x121Inputs.xdonInputs.showHigh = false;
|
||||
x121Inputs.xdonInputs.showClose = true;
|
||||
x121Inputs.xdonInputs.showLow = true;
|
||||
x121Inputs.xdonInputs.showHigh = true;
|
||||
|
||||
//
|
||||
// XVWAP ...
|
||||
x121Inputs.xvwapInputs.showVWapFast = true;
|
||||
x121Inputs.xvwapInputs.showVWapMedium = true;
|
||||
x121Inputs.xvwapInputs.showVWapSlow = true;
|
||||
x121Inputs.xvwapInputs.showVWapFast = false;
|
||||
x121Inputs.xvwapInputs.showVWapMedium = false;
|
||||
x121Inputs.xvwapInputs.showVWapSlow = false;
|
||||
|
||||
//
|
||||
// Initialize Cycle Helpers ...
|
||||
|
||||
Reference in New Issue
Block a user