This commit is contained in:
2024-05-28 12:59:18 +03:30
parent 670ca1eac2
commit ff5ef28ead
4 changed files with 345 additions and 325 deletions
+283 -284
View File
@@ -2917,7 +2917,7 @@ public:
//
double providedSL = 0;
double providedTP = 0;
double providedR2r = 0;
double providedR2r = 2;
//
// Long ...
@@ -3095,8 +3095,8 @@ public:
//
// TODOO: Remove this ...
sl = hasLong
? GetMaxVales(true)
: GetMinPeaks(true);
? cMarket.pv.GetLCLL(0)
: cMarket.pv.GetLCHH(0);
double risk = MathAbs(entry - sl);
double reward = risk * r2r;
tp = hasLong
@@ -4677,6 +4677,10 @@ private:
//
ArraySetAsSeries(mBullishScore, true);
ArraySetAsSeries(mBearishScore, true);
//
string scoreMSG = "Scores: \nBullihs: " + ToString(bullishScore) + "\nBearish: " + ToString(bearishScore);
Comment(scoreMSG);
}
//
@@ -7519,6 +7523,38 @@ private:
//
bool result = false;
//
double bearScore = 0;
double bullScore = 0;
mConditions.GenerateScore(
bullScore,
bearScore //
);
//
double bullScoreAVG3 = GetBullishScoreAverage(1, 3);
double bearScoreAVG100 = GetBearishScoreAverage(1, 100);
//
result =
//
bearScore > bullScoreAVG3 &&
(
//
(bearScore > 100 && bearScore > bullScore && bullScore > (bearScore * 0.7))
//
||
//
(bearScore < 30 && bullScore > 150)
//
||
//
(bearScore == bearScoreAVG100)
//
)
//
;
//
return result;
}
@@ -7550,27 +7586,27 @@ private:
//
bool result = false;
// //
// bool isCMStrLong =
// //
// mConditions.cMarketConditions.isTrendSwitchedToBullish &&
// (mConditions.hMarketConditions.isTrendBullish &&
// mConditions.lMarketConditions.isTrendBullish &&
// mConditions.mMarketConditions.isTrendBullish &&
// mConditions.sMarketConditions.isTrendBullish)
// //
// ;
//
bool isCMStrLong =
//
mConditions.cMarketConditions.isTrendSwitchedToBullish &&
(mConditions.hMarketConditions.isTrendBullish &&
mConditions.lMarketConditions.isTrendBullish &&
mConditions.mMarketConditions.isTrendBullish &&
mConditions.sMarketConditions.isTrendBullish)
//
;
// //
// bool isSMStrLong =
// //
// mConditions.sMarketConditions.isTrendSwitchedToBullish &&
// (mConditions.hMarketConditions.isTrendBullish &&
// mConditions.lMarketConditions.isTrendBullish &&
// mConditions.mMarketConditions.isTrendBullish &&
// mConditions.cMarketConditions.isTrendBullish)
// //
// ;
//
bool isSMStrLong =
//
mConditions.sMarketConditions.isTrendSwitchedToBullish &&
(mConditions.hMarketConditions.isTrendBullish &&
mConditions.lMarketConditions.isTrendBullish &&
mConditions.mMarketConditions.isTrendBullish &&
mConditions.cMarketConditions.isTrendBullish)
//
;
//
bool isMMStrLong =
@@ -7611,13 +7647,13 @@ private:
//
result =
//
// isCMStrLong
// //
// ||
isCMStrLong
//
// isSMStrLong
// //
// ||
||
isSMStrLong
//
||
//
isMMStrLong
//
@@ -7631,15 +7667,6 @@ private:
//
;
//
// result = result && isScorePassed;
//
// if (result)
// {
// sl = GetMinVales();
// }
//
return result;
}
@@ -7658,51 +7685,51 @@ private:
//
// Current Market ...
// bool isCMCLong =
// //
// (
// //
// (mConditions.cMarketConditions.isSlowOverVerifier &&
// mConditions.cMarketConditions.isFastCrossedOverVerifier)
// //
// ||
// //
// (mConditions.cMarketConditions.isFastOverVerifier &&
// mConditions.cMarketConditions.isSlowCrossedOverVerifier)
// //
// )
// //
// &&
// //
// (mConditions.cMarketConditions.isCloseOverFast &&
// mConditions.cMarketConditions.isCloseOverSlow &&
// mConditions.cMarketConditions.isCloseOverVerifier)
// //
// ;
bool isCMCLong =
//
(
//
(mConditions.cMarketConditions.isSlowOverVerifier &&
mConditions.cMarketConditions.isFastCrossedOverVerifier)
//
||
//
(mConditions.cMarketConditions.isFastOverVerifier &&
mConditions.cMarketConditions.isSlowCrossedOverVerifier)
//
)
//
&&
//
(mConditions.cMarketConditions.isCloseOverFast &&
mConditions.cMarketConditions.isCloseOverSlow &&
mConditions.cMarketConditions.isCloseOverVerifier)
//
;
//
// Short Market ...
// bool isSMCLong =
// //
// (
// //
// (mConditions.sMarketConditions.isSlowOverVerifier &&
// mConditions.sMarketConditions.isFastCrossedOverVerifier)
// //
// ||
// //
// (mConditions.sMarketConditions.isFastOverVerifier &&
// mConditions.sMarketConditions.isSlowCrossedOverVerifier)
// //
// )
// //
// &&
// //
// (mConditions.sMarketConditions.isCloseOverFast &&
// mConditions.sMarketConditions.isCloseOverSlow &&
// mConditions.sMarketConditions.isCloseOverVerifier)
// //
// ;
bool isSMCLong =
//
(
//
(mConditions.sMarketConditions.isSlowOverVerifier &&
mConditions.sMarketConditions.isFastCrossedOverVerifier)
//
||
//
(mConditions.sMarketConditions.isFastOverVerifier &&
mConditions.sMarketConditions.isSlowCrossedOverVerifier)
//
)
//
&&
//
(mConditions.sMarketConditions.isCloseOverFast &&
mConditions.sMarketConditions.isCloseOverSlow &&
mConditions.sMarketConditions.isCloseOverVerifier)
//
;
//
// Medium Market ...
@@ -7776,19 +7803,17 @@ private:
//
;
//
// bool isScorePassed = IsScorePassedForLong();
//
result =
// //
// isCMCLong
// //
// ||
// //
// isSMCLong
// //
// ||
//
isCMCLong
//
||
//
isSMCLong
//
||
//
isMMCLong
//
@@ -7802,15 +7827,6 @@ private:
//
;
//
// result = result && isScorePassed;
// //
// if (result)
// {
// sl = GetMinVales();
// }
//
return result;
}
@@ -7828,26 +7844,26 @@ private:
bool result = false;
// //
// bool isCCHELong =
// //
// (mConditions.cMarketConditions.isCHESwitchedInStrongLong &&
// (mConditions.sMarketConditions.isCHEInStrongLong &&
// mConditions.mMarketConditions.isCHEInStrongLong &&
// mConditions.lMarketConditions.isCHEInStrongLong &&
// mConditions.hMarketConditions.isCHEInStrongLong))
// //
// ;
bool isCCHELong =
//
(mConditions.cMarketConditions.isCHESwitchedInStrongLong &&
(mConditions.sMarketConditions.isCHEInStrongLong &&
mConditions.mMarketConditions.isCHEInStrongLong &&
mConditions.lMarketConditions.isCHEInStrongLong &&
mConditions.hMarketConditions.isCHEInStrongLong))
//
;
// //
// bool isSCHELong =
// //
// (mConditions.sMarketConditions.isCHESwitchedInStrongLong &&
// (mConditions.cMarketConditions.isCHEInStrongLong &&
// mConditions.mMarketConditions.isCHEInStrongLong &&
// mConditions.lMarketConditions.isCHEInStrongLong &&
// mConditions.hMarketConditions.isCHEInStrongLong))
// //
// ;
//
bool isSCHELong =
//
(mConditions.sMarketConditions.isCHESwitchedInStrongLong &&
(mConditions.cMarketConditions.isCHEInStrongLong &&
mConditions.mMarketConditions.isCHEInStrongLong &&
mConditions.lMarketConditions.isCHEInStrongLong &&
mConditions.hMarketConditions.isCHEInStrongLong))
//
;
//
bool isMCHELong =
@@ -7882,19 +7898,16 @@ private:
//
;
//
// bool isScorePassed = IsScorePassedForLong();
//
result =
// //
// isCCHELong
// //
// ||
// //
// isSCHELong
// //
// ||
//
isCCHELong
//
||
//
isSCHELong
//
||
//
isMCHELong
//
@@ -7908,15 +7921,6 @@ private:
//
;
//
// result = result && isScorePassed;
// //
// if (result)
// {
// sl = GetMinVales();
// }
//
return result;
}
@@ -8674,6 +8678,36 @@ private:
//
bool result = false;
//
double bearScore = 0;
double bullScore = 0;
mConditions.GenerateScore(
bullScore,
bearScore //
);
//
double bearScoreAVG3 = GetBearishScoreAverage(1, 3);
double bullScoreAVG100 = GetBullishScoreAverage(1, 100);
//
result =
//
bearScore > bearScoreAVG3 &&
(
//
(bullScore > 100 && bullScore > bearScore && bearScore > (bullScore * 0.7))
//
||
//
(bullScore < 30 && bearScore > 150)
//
||
//
(bullScore == bullScoreAVG100)
//
);
//
return result;
}
@@ -8705,27 +8739,27 @@ private:
//
bool result = false;
// //
// bool isCMStrShort =
// //
// mConditions.cMarketConditions.isTrendSwitchedToBearish &&
// (mConditions.hMarketConditions.isTrendBearish &&
// mConditions.lMarketConditions.isTrendBearish &&
// mConditions.mMarketConditions.isTrendBearish &&
// mConditions.sMarketConditions.isTrendBearish)
// //
// ;
//
bool isCMStrShort =
//
mConditions.cMarketConditions.isTrendSwitchedToBearish &&
(mConditions.hMarketConditions.isTrendBearish &&
mConditions.lMarketConditions.isTrendBearish &&
mConditions.mMarketConditions.isTrendBearish &&
mConditions.sMarketConditions.isTrendBearish)
//
;
// //
// bool isSMStrShort =
// //
// mConditions.sMarketConditions.isTrendSwitchedToBearish &&
// (mConditions.hMarketConditions.isTrendBearish &&
// mConditions.lMarketConditions.isTrendBearish &&
// mConditions.mMarketConditions.isTrendBearish &&
// mConditions.cMarketConditions.isTrendBearish)
// //
// ;
//
bool isSMStrShort =
//
mConditions.sMarketConditions.isTrendSwitchedToBearish &&
(mConditions.hMarketConditions.isTrendBearish &&
mConditions.lMarketConditions.isTrendBearish &&
mConditions.mMarketConditions.isTrendBearish &&
mConditions.cMarketConditions.isTrendBearish)
//
;
//
bool isMMStrShort =
@@ -8760,19 +8794,16 @@ private:
//
;
//
// bool isScorePassed = IsScorePassedForShort();
//
result =
// //
// isCMStrShort
// //
// ||
// //
// isSMStrShort
// //
// ||
//
isCMStrShort
//
||
//
isSMStrShort
//
||
//
isMMStrShort
//
@@ -8786,15 +8817,6 @@ private:
//
;
//
// result = result && isScorePassed;
// //
// if (result)
// {
// sl = GetMaxPeaks();
// }
//
return result;
}
@@ -8813,51 +8835,51 @@ private:
//
// Current Market ...
// bool isCMCShort =
// //
// (
// //
// (mConditions.cMarketConditions.isSlowUnderVerifier &&
// mConditions.cMarketConditions.isFastCrossedUnderVerifier)
// //
// ||
// //
// (mConditions.cMarketConditions.isFastUnderVerifier &&
// mConditions.cMarketConditions.isSlowCrossedUnderVerifier)
// //
// )
// //
// &&
// //
// (mConditions.cMarketConditions.isCloseUnderFast &&
// mConditions.cMarketConditions.isCloseUnderSlow &&
// mConditions.cMarketConditions.isCloseUnderVerifier)
// //
// ;
bool isCMCShort =
//
(
//
(mConditions.cMarketConditions.isSlowUnderVerifier &&
mConditions.cMarketConditions.isFastCrossedUnderVerifier)
//
||
//
(mConditions.cMarketConditions.isFastUnderVerifier &&
mConditions.cMarketConditions.isSlowCrossedUnderVerifier)
//
)
//
&&
//
(mConditions.cMarketConditions.isCloseUnderFast &&
mConditions.cMarketConditions.isCloseUnderSlow &&
mConditions.cMarketConditions.isCloseUnderVerifier)
//
;
//
// Short Market ...
// bool isSMCShort =
// //
// (
// //
// (mConditions.sMarketConditions.isSlowUnderVerifier &&
// mConditions.sMarketConditions.isFastCrossedUnderVerifier)
// //
// ||
// //
// (mConditions.sMarketConditions.isFastUnderVerifier &&
// mConditions.sMarketConditions.isSlowCrossedUnderVerifier)
// //
// )
// //
// &&
// //
// (mConditions.sMarketConditions.isCloseUnderFast &&
// mConditions.sMarketConditions.isCloseUnderSlow &&
// mConditions.sMarketConditions.isCloseUnderVerifier)
// //
// ;
bool isSMCShort =
//
(
//
(mConditions.sMarketConditions.isSlowUnderVerifier &&
mConditions.sMarketConditions.isFastCrossedUnderVerifier)
//
||
//
(mConditions.sMarketConditions.isFastUnderVerifier &&
mConditions.sMarketConditions.isSlowCrossedUnderVerifier)
//
)
//
&&
//
(mConditions.sMarketConditions.isCloseUnderFast &&
mConditions.sMarketConditions.isCloseUnderSlow &&
mConditions.sMarketConditions.isCloseUnderVerifier)
//
;
//
// Medium Market ...
@@ -8931,19 +8953,16 @@ private:
//
;
//
// bool isScorePassed = IsScorePassedForShort();
//
result =
// //
// isCMCShort
// //
// ||
// //
// isSMCShort
// //
// ||
//
isCMCShort
//
||
//
isSMCShort
//
||
//
isMMCShort
//
@@ -8957,15 +8976,6 @@ private:
//
;
// //
// result = result && isScorePassed;
// //
// if (result)
// {
// sl = GetMaxPeaks();
// }
//
return result;
}
@@ -8982,27 +8992,27 @@ private:
//
bool result = false;
// //
// bool isCCHEShort =
// //
// (mConditions.cMarketConditions.isCHESwitchedInStrongShort &&
// (mConditions.sMarketConditions.isCHEInStrongShort &&
// mConditions.mMarketConditions.isCHEInStrongShort &&
// mConditions.lMarketConditions.isCHEInStrongShort &&
// mConditions.hMarketConditions.isCHEInStrongShort))
// //
// ;
//
bool isCCHEShort =
//
(mConditions.cMarketConditions.isCHESwitchedInStrongShort &&
(mConditions.sMarketConditions.isCHEInStrongShort &&
mConditions.mMarketConditions.isCHEInStrongShort &&
mConditions.lMarketConditions.isCHEInStrongShort &&
mConditions.hMarketConditions.isCHEInStrongShort))
//
;
// //
// bool isSCHEShort =
// //
// (mConditions.sMarketConditions.isCHESwitchedInStrongShort &&
// (mConditions.cMarketConditions.isCHEInStrongShort &&
// mConditions.mMarketConditions.isCHEInStrongShort &&
// mConditions.lMarketConditions.isCHEInStrongShort &&
// mConditions.hMarketConditions.isCHEInStrongShort))
// //
// ;
//
bool isSCHEShort =
//
(mConditions.sMarketConditions.isCHESwitchedInStrongShort &&
(mConditions.cMarketConditions.isCHEInStrongShort &&
mConditions.mMarketConditions.isCHEInStrongShort &&
mConditions.lMarketConditions.isCHEInStrongShort &&
mConditions.hMarketConditions.isCHEInStrongShort))
//
;
//
bool isMCHEShort =
@@ -9037,19 +9047,16 @@ private:
//
;
//
// bool isScorePassed = IsScorePassedForShort();
//
result =
// //
// isCCHEShort
// //
// ||
// //
// isSCHEShort
// //
// ||
//
isCCHEShort
//
||
//
isSCHEShort
//
||
//
isMCHEShort
//
@@ -9063,9 +9070,6 @@ private:
//
;
//
// result = result && isScorePassed;
//
return result;
}
@@ -9179,8 +9183,7 @@ private:
//
bool isCSMHKShort =
//
(isCSMHKBearish ||
isCSMHKSwitchedToBearish) &&
(isCSMHKSwitchedToBearish) &&
isSSMHKBearish &&
isMSMHKBearish &&
isLSMHKBearish &&
@@ -9191,8 +9194,7 @@ private:
//
bool isSSMHKShort =
//
(isSSMHKBearish ||
isSSMHKSwitchedToBearish) &&
(isSSMHKSwitchedToBearish) &&
isCSMHKBearish &&
isMSMHKBearish &&
isLSMHKBearish &&
@@ -9203,8 +9205,7 @@ private:
//
bool isMSMHKShort =
//
(isMSMHKBearish ||
isMSMHKSwitchedToBearish) &&
(isMSMHKSwitchedToBearish) &&
isSSMHKBearish &&
isCSMHKBearish &&
isLSMHKBearish &&
@@ -9215,8 +9216,7 @@ private:
//
bool isLSMHKShort =
//
(isLSMHKBearish ||
isLSMHKSwitchedToBearish) &&
(isLSMHKSwitchedToBearish) &&
isSSMHKBearish &&
isCSMHKBearish &&
isMSMHKBearish &&
@@ -9227,8 +9227,7 @@ private:
//
bool isHSMHKShort =
//
(isHSMHKBearish ||
isHSMHKSwitchedToBearish) &&
(isHSMHKSwitchedToBearish) &&
isSSMHKBearish &&
isCSMHKBearish &&
isMSMHKBearish &&