last ...
This commit is contained in:
@@ -2917,7 +2917,7 @@ public:
|
|||||||
//
|
//
|
||||||
double providedSL = 0;
|
double providedSL = 0;
|
||||||
double providedTP = 0;
|
double providedTP = 0;
|
||||||
double providedR2r = 0;
|
double providedR2r = 2;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Long ...
|
// Long ...
|
||||||
@@ -3095,8 +3095,8 @@ public:
|
|||||||
//
|
//
|
||||||
// TODOO: Remove this ...
|
// TODOO: Remove this ...
|
||||||
sl = hasLong
|
sl = hasLong
|
||||||
? GetMaxVales(true)
|
? cMarket.pv.GetLCLL(0)
|
||||||
: GetMinPeaks(true);
|
: cMarket.pv.GetLCHH(0);
|
||||||
double risk = MathAbs(entry - sl);
|
double risk = MathAbs(entry - sl);
|
||||||
double reward = risk * r2r;
|
double reward = risk * r2r;
|
||||||
tp = hasLong
|
tp = hasLong
|
||||||
@@ -4677,6 +4677,10 @@ private:
|
|||||||
//
|
//
|
||||||
ArraySetAsSeries(mBullishScore, true);
|
ArraySetAsSeries(mBullishScore, true);
|
||||||
ArraySetAsSeries(mBearishScore, true);
|
ArraySetAsSeries(mBearishScore, true);
|
||||||
|
|
||||||
|
//
|
||||||
|
string scoreMSG = "Scores: \nBullihs: " + ToString(bullishScore) + "\nBearish: " + ToString(bearishScore);
|
||||||
|
Comment(scoreMSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -7519,6 +7523,38 @@ private:
|
|||||||
//
|
//
|
||||||
bool result = false;
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -7550,27 +7586,27 @@ private:
|
|||||||
//
|
//
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
// //
|
//
|
||||||
// bool isCMStrLong =
|
bool isCMStrLong =
|
||||||
// //
|
//
|
||||||
// mConditions.cMarketConditions.isTrendSwitchedToBullish &&
|
mConditions.cMarketConditions.isTrendSwitchedToBullish &&
|
||||||
// (mConditions.hMarketConditions.isTrendBullish &&
|
(mConditions.hMarketConditions.isTrendBullish &&
|
||||||
// mConditions.lMarketConditions.isTrendBullish &&
|
mConditions.lMarketConditions.isTrendBullish &&
|
||||||
// mConditions.mMarketConditions.isTrendBullish &&
|
mConditions.mMarketConditions.isTrendBullish &&
|
||||||
// mConditions.sMarketConditions.isTrendBullish)
|
mConditions.sMarketConditions.isTrendBullish)
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
// //
|
//
|
||||||
// bool isSMStrLong =
|
bool isSMStrLong =
|
||||||
// //
|
//
|
||||||
// mConditions.sMarketConditions.isTrendSwitchedToBullish &&
|
mConditions.sMarketConditions.isTrendSwitchedToBullish &&
|
||||||
// (mConditions.hMarketConditions.isTrendBullish &&
|
(mConditions.hMarketConditions.isTrendBullish &&
|
||||||
// mConditions.lMarketConditions.isTrendBullish &&
|
mConditions.lMarketConditions.isTrendBullish &&
|
||||||
// mConditions.mMarketConditions.isTrendBullish &&
|
mConditions.mMarketConditions.isTrendBullish &&
|
||||||
// mConditions.cMarketConditions.isTrendBullish)
|
mConditions.cMarketConditions.isTrendBullish)
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
bool isMMStrLong =
|
bool isMMStrLong =
|
||||||
@@ -7611,13 +7647,13 @@ private:
|
|||||||
//
|
//
|
||||||
result =
|
result =
|
||||||
//
|
//
|
||||||
// isCMStrLong
|
isCMStrLong
|
||||||
// //
|
|
||||||
// ||
|
|
||||||
//
|
//
|
||||||
// isSMStrLong
|
||
|
||||||
// //
|
|
||||||
// ||
|
isSMStrLong
|
||||||
|
//
|
||||||
|
||
|
||||||
//
|
//
|
||||||
isMMStrLong
|
isMMStrLong
|
||||||
//
|
//
|
||||||
@@ -7631,15 +7667,6 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// result = result && isScorePassed;
|
|
||||||
|
|
||||||
//
|
|
||||||
// if (result)
|
|
||||||
// {
|
|
||||||
// sl = GetMinVales();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -7658,51 +7685,51 @@ private:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Current Market ...
|
// Current Market ...
|
||||||
// bool isCMCLong =
|
bool isCMCLong =
|
||||||
// //
|
//
|
||||||
// (
|
(
|
||||||
// //
|
//
|
||||||
// (mConditions.cMarketConditions.isSlowOverVerifier &&
|
(mConditions.cMarketConditions.isSlowOverVerifier &&
|
||||||
// mConditions.cMarketConditions.isFastCrossedOverVerifier)
|
mConditions.cMarketConditions.isFastCrossedOverVerifier)
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
// //
|
//
|
||||||
// (mConditions.cMarketConditions.isFastOverVerifier &&
|
(mConditions.cMarketConditions.isFastOverVerifier &&
|
||||||
// mConditions.cMarketConditions.isSlowCrossedOverVerifier)
|
mConditions.cMarketConditions.isSlowCrossedOverVerifier)
|
||||||
// //
|
//
|
||||||
// )
|
)
|
||||||
// //
|
//
|
||||||
// &&
|
&&
|
||||||
// //
|
//
|
||||||
// (mConditions.cMarketConditions.isCloseOverFast &&
|
(mConditions.cMarketConditions.isCloseOverFast &&
|
||||||
// mConditions.cMarketConditions.isCloseOverSlow &&
|
mConditions.cMarketConditions.isCloseOverSlow &&
|
||||||
// mConditions.cMarketConditions.isCloseOverVerifier)
|
mConditions.cMarketConditions.isCloseOverVerifier)
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Short Market ...
|
// Short Market ...
|
||||||
// bool isSMCLong =
|
bool isSMCLong =
|
||||||
// //
|
//
|
||||||
// (
|
(
|
||||||
// //
|
//
|
||||||
// (mConditions.sMarketConditions.isSlowOverVerifier &&
|
(mConditions.sMarketConditions.isSlowOverVerifier &&
|
||||||
// mConditions.sMarketConditions.isFastCrossedOverVerifier)
|
mConditions.sMarketConditions.isFastCrossedOverVerifier)
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
// //
|
//
|
||||||
// (mConditions.sMarketConditions.isFastOverVerifier &&
|
(mConditions.sMarketConditions.isFastOverVerifier &&
|
||||||
// mConditions.sMarketConditions.isSlowCrossedOverVerifier)
|
mConditions.sMarketConditions.isSlowCrossedOverVerifier)
|
||||||
// //
|
//
|
||||||
// )
|
)
|
||||||
// //
|
//
|
||||||
// &&
|
&&
|
||||||
// //
|
//
|
||||||
// (mConditions.sMarketConditions.isCloseOverFast &&
|
(mConditions.sMarketConditions.isCloseOverFast &&
|
||||||
// mConditions.sMarketConditions.isCloseOverSlow &&
|
mConditions.sMarketConditions.isCloseOverSlow &&
|
||||||
// mConditions.sMarketConditions.isCloseOverVerifier)
|
mConditions.sMarketConditions.isCloseOverVerifier)
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Medium Market ...
|
// Medium Market ...
|
||||||
@@ -7776,19 +7803,17 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// bool isScorePassed = IsScorePassedForLong();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
result =
|
result =
|
||||||
// //
|
//
|
||||||
// isCMCLong
|
isCMCLong
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
// //
|
//
|
||||||
// isSMCLong
|
isSMCLong
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
//
|
//
|
||||||
isMMCLong
|
isMMCLong
|
||||||
//
|
//
|
||||||
@@ -7802,15 +7827,6 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// result = result && isScorePassed;
|
|
||||||
|
|
||||||
// //
|
|
||||||
// if (result)
|
|
||||||
// {
|
|
||||||
// sl = GetMinVales();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -7828,26 +7844,26 @@ private:
|
|||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
// //
|
// //
|
||||||
// bool isCCHELong =
|
bool isCCHELong =
|
||||||
// //
|
//
|
||||||
// (mConditions.cMarketConditions.isCHESwitchedInStrongLong &&
|
(mConditions.cMarketConditions.isCHESwitchedInStrongLong &&
|
||||||
// (mConditions.sMarketConditions.isCHEInStrongLong &&
|
(mConditions.sMarketConditions.isCHEInStrongLong &&
|
||||||
// mConditions.mMarketConditions.isCHEInStrongLong &&
|
mConditions.mMarketConditions.isCHEInStrongLong &&
|
||||||
// mConditions.lMarketConditions.isCHEInStrongLong &&
|
mConditions.lMarketConditions.isCHEInStrongLong &&
|
||||||
// mConditions.hMarketConditions.isCHEInStrongLong))
|
mConditions.hMarketConditions.isCHEInStrongLong))
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
// //
|
//
|
||||||
// bool isSCHELong =
|
bool isSCHELong =
|
||||||
// //
|
//
|
||||||
// (mConditions.sMarketConditions.isCHESwitchedInStrongLong &&
|
(mConditions.sMarketConditions.isCHESwitchedInStrongLong &&
|
||||||
// (mConditions.cMarketConditions.isCHEInStrongLong &&
|
(mConditions.cMarketConditions.isCHEInStrongLong &&
|
||||||
// mConditions.mMarketConditions.isCHEInStrongLong &&
|
mConditions.mMarketConditions.isCHEInStrongLong &&
|
||||||
// mConditions.lMarketConditions.isCHEInStrongLong &&
|
mConditions.lMarketConditions.isCHEInStrongLong &&
|
||||||
// mConditions.hMarketConditions.isCHEInStrongLong))
|
mConditions.hMarketConditions.isCHEInStrongLong))
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
bool isMCHELong =
|
bool isMCHELong =
|
||||||
@@ -7882,19 +7898,16 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// bool isScorePassed = IsScorePassedForLong();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
result =
|
result =
|
||||||
// //
|
//
|
||||||
// isCCHELong
|
isCCHELong
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
// //
|
//
|
||||||
// isSCHELong
|
isSCHELong
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
//
|
//
|
||||||
isMCHELong
|
isMCHELong
|
||||||
//
|
//
|
||||||
@@ -7908,15 +7921,6 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// result = result && isScorePassed;
|
|
||||||
|
|
||||||
// //
|
|
||||||
// if (result)
|
|
||||||
// {
|
|
||||||
// sl = GetMinVales();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -8674,6 +8678,36 @@ private:
|
|||||||
//
|
//
|
||||||
bool result = false;
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -8705,27 +8739,27 @@ private:
|
|||||||
//
|
//
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
// //
|
//
|
||||||
// bool isCMStrShort =
|
bool isCMStrShort =
|
||||||
// //
|
//
|
||||||
// mConditions.cMarketConditions.isTrendSwitchedToBearish &&
|
mConditions.cMarketConditions.isTrendSwitchedToBearish &&
|
||||||
// (mConditions.hMarketConditions.isTrendBearish &&
|
(mConditions.hMarketConditions.isTrendBearish &&
|
||||||
// mConditions.lMarketConditions.isTrendBearish &&
|
mConditions.lMarketConditions.isTrendBearish &&
|
||||||
// mConditions.mMarketConditions.isTrendBearish &&
|
mConditions.mMarketConditions.isTrendBearish &&
|
||||||
// mConditions.sMarketConditions.isTrendBearish)
|
mConditions.sMarketConditions.isTrendBearish)
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
// //
|
//
|
||||||
// bool isSMStrShort =
|
bool isSMStrShort =
|
||||||
// //
|
//
|
||||||
// mConditions.sMarketConditions.isTrendSwitchedToBearish &&
|
mConditions.sMarketConditions.isTrendSwitchedToBearish &&
|
||||||
// (mConditions.hMarketConditions.isTrendBearish &&
|
(mConditions.hMarketConditions.isTrendBearish &&
|
||||||
// mConditions.lMarketConditions.isTrendBearish &&
|
mConditions.lMarketConditions.isTrendBearish &&
|
||||||
// mConditions.mMarketConditions.isTrendBearish &&
|
mConditions.mMarketConditions.isTrendBearish &&
|
||||||
// mConditions.cMarketConditions.isTrendBearish)
|
mConditions.cMarketConditions.isTrendBearish)
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
bool isMMStrShort =
|
bool isMMStrShort =
|
||||||
@@ -8760,19 +8794,16 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// bool isScorePassed = IsScorePassedForShort();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
result =
|
result =
|
||||||
// //
|
//
|
||||||
// isCMStrShort
|
isCMStrShort
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
// //
|
//
|
||||||
// isSMStrShort
|
isSMStrShort
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
//
|
//
|
||||||
isMMStrShort
|
isMMStrShort
|
||||||
//
|
//
|
||||||
@@ -8786,15 +8817,6 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// result = result && isScorePassed;
|
|
||||||
|
|
||||||
// //
|
|
||||||
// if (result)
|
|
||||||
// {
|
|
||||||
// sl = GetMaxPeaks();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -8813,51 +8835,51 @@ private:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Current Market ...
|
// Current Market ...
|
||||||
// bool isCMCShort =
|
bool isCMCShort =
|
||||||
// //
|
//
|
||||||
// (
|
(
|
||||||
// //
|
//
|
||||||
// (mConditions.cMarketConditions.isSlowUnderVerifier &&
|
(mConditions.cMarketConditions.isSlowUnderVerifier &&
|
||||||
// mConditions.cMarketConditions.isFastCrossedUnderVerifier)
|
mConditions.cMarketConditions.isFastCrossedUnderVerifier)
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
// //
|
//
|
||||||
// (mConditions.cMarketConditions.isFastUnderVerifier &&
|
(mConditions.cMarketConditions.isFastUnderVerifier &&
|
||||||
// mConditions.cMarketConditions.isSlowCrossedUnderVerifier)
|
mConditions.cMarketConditions.isSlowCrossedUnderVerifier)
|
||||||
// //
|
//
|
||||||
// )
|
)
|
||||||
// //
|
//
|
||||||
// &&
|
&&
|
||||||
// //
|
//
|
||||||
// (mConditions.cMarketConditions.isCloseUnderFast &&
|
(mConditions.cMarketConditions.isCloseUnderFast &&
|
||||||
// mConditions.cMarketConditions.isCloseUnderSlow &&
|
mConditions.cMarketConditions.isCloseUnderSlow &&
|
||||||
// mConditions.cMarketConditions.isCloseUnderVerifier)
|
mConditions.cMarketConditions.isCloseUnderVerifier)
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Short Market ...
|
// Short Market ...
|
||||||
// bool isSMCShort =
|
bool isSMCShort =
|
||||||
// //
|
//
|
||||||
// (
|
(
|
||||||
// //
|
//
|
||||||
// (mConditions.sMarketConditions.isSlowUnderVerifier &&
|
(mConditions.sMarketConditions.isSlowUnderVerifier &&
|
||||||
// mConditions.sMarketConditions.isFastCrossedUnderVerifier)
|
mConditions.sMarketConditions.isFastCrossedUnderVerifier)
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
// //
|
//
|
||||||
// (mConditions.sMarketConditions.isFastUnderVerifier &&
|
(mConditions.sMarketConditions.isFastUnderVerifier &&
|
||||||
// mConditions.sMarketConditions.isSlowCrossedUnderVerifier)
|
mConditions.sMarketConditions.isSlowCrossedUnderVerifier)
|
||||||
// //
|
//
|
||||||
// )
|
)
|
||||||
// //
|
//
|
||||||
// &&
|
&&
|
||||||
// //
|
//
|
||||||
// (mConditions.sMarketConditions.isCloseUnderFast &&
|
(mConditions.sMarketConditions.isCloseUnderFast &&
|
||||||
// mConditions.sMarketConditions.isCloseUnderSlow &&
|
mConditions.sMarketConditions.isCloseUnderSlow &&
|
||||||
// mConditions.sMarketConditions.isCloseUnderVerifier)
|
mConditions.sMarketConditions.isCloseUnderVerifier)
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Medium Market ...
|
// Medium Market ...
|
||||||
@@ -8931,19 +8953,16 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// bool isScorePassed = IsScorePassedForShort();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
result =
|
result =
|
||||||
// //
|
//
|
||||||
// isCMCShort
|
isCMCShort
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
// //
|
//
|
||||||
// isSMCShort
|
isSMCShort
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
//
|
//
|
||||||
isMMCShort
|
isMMCShort
|
||||||
//
|
//
|
||||||
@@ -8957,15 +8976,6 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
// //
|
|
||||||
// result = result && isScorePassed;
|
|
||||||
|
|
||||||
// //
|
|
||||||
// if (result)
|
|
||||||
// {
|
|
||||||
// sl = GetMaxPeaks();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -8982,27 +8992,27 @@ private:
|
|||||||
//
|
//
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
// //
|
//
|
||||||
// bool isCCHEShort =
|
bool isCCHEShort =
|
||||||
// //
|
//
|
||||||
// (mConditions.cMarketConditions.isCHESwitchedInStrongShort &&
|
(mConditions.cMarketConditions.isCHESwitchedInStrongShort &&
|
||||||
// (mConditions.sMarketConditions.isCHEInStrongShort &&
|
(mConditions.sMarketConditions.isCHEInStrongShort &&
|
||||||
// mConditions.mMarketConditions.isCHEInStrongShort &&
|
mConditions.mMarketConditions.isCHEInStrongShort &&
|
||||||
// mConditions.lMarketConditions.isCHEInStrongShort &&
|
mConditions.lMarketConditions.isCHEInStrongShort &&
|
||||||
// mConditions.hMarketConditions.isCHEInStrongShort))
|
mConditions.hMarketConditions.isCHEInStrongShort))
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
// //
|
//
|
||||||
// bool isSCHEShort =
|
bool isSCHEShort =
|
||||||
// //
|
//
|
||||||
// (mConditions.sMarketConditions.isCHESwitchedInStrongShort &&
|
(mConditions.sMarketConditions.isCHESwitchedInStrongShort &&
|
||||||
// (mConditions.cMarketConditions.isCHEInStrongShort &&
|
(mConditions.cMarketConditions.isCHEInStrongShort &&
|
||||||
// mConditions.mMarketConditions.isCHEInStrongShort &&
|
mConditions.mMarketConditions.isCHEInStrongShort &&
|
||||||
// mConditions.lMarketConditions.isCHEInStrongShort &&
|
mConditions.lMarketConditions.isCHEInStrongShort &&
|
||||||
// mConditions.hMarketConditions.isCHEInStrongShort))
|
mConditions.hMarketConditions.isCHEInStrongShort))
|
||||||
// //
|
//
|
||||||
// ;
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
bool isMCHEShort =
|
bool isMCHEShort =
|
||||||
@@ -9037,19 +9047,16 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// bool isScorePassed = IsScorePassedForShort();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
result =
|
result =
|
||||||
// //
|
//
|
||||||
// isCCHEShort
|
isCCHEShort
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
// //
|
//
|
||||||
// isSCHEShort
|
isSCHEShort
|
||||||
// //
|
//
|
||||||
// ||
|
||
|
||||||
//
|
//
|
||||||
isMCHEShort
|
isMCHEShort
|
||||||
//
|
//
|
||||||
@@ -9063,9 +9070,6 @@ private:
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
// result = result && isScorePassed;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -9179,8 +9183,7 @@ private:
|
|||||||
//
|
//
|
||||||
bool isCSMHKShort =
|
bool isCSMHKShort =
|
||||||
//
|
//
|
||||||
(isCSMHKBearish ||
|
(isCSMHKSwitchedToBearish) &&
|
||||||
isCSMHKSwitchedToBearish) &&
|
|
||||||
isSSMHKBearish &&
|
isSSMHKBearish &&
|
||||||
isMSMHKBearish &&
|
isMSMHKBearish &&
|
||||||
isLSMHKBearish &&
|
isLSMHKBearish &&
|
||||||
@@ -9191,8 +9194,7 @@ private:
|
|||||||
//
|
//
|
||||||
bool isSSMHKShort =
|
bool isSSMHKShort =
|
||||||
//
|
//
|
||||||
(isSSMHKBearish ||
|
(isSSMHKSwitchedToBearish) &&
|
||||||
isSSMHKSwitchedToBearish) &&
|
|
||||||
isCSMHKBearish &&
|
isCSMHKBearish &&
|
||||||
isMSMHKBearish &&
|
isMSMHKBearish &&
|
||||||
isLSMHKBearish &&
|
isLSMHKBearish &&
|
||||||
@@ -9203,8 +9205,7 @@ private:
|
|||||||
//
|
//
|
||||||
bool isMSMHKShort =
|
bool isMSMHKShort =
|
||||||
//
|
//
|
||||||
(isMSMHKBearish ||
|
(isMSMHKSwitchedToBearish) &&
|
||||||
isMSMHKSwitchedToBearish) &&
|
|
||||||
isSSMHKBearish &&
|
isSSMHKBearish &&
|
||||||
isCSMHKBearish &&
|
isCSMHKBearish &&
|
||||||
isLSMHKBearish &&
|
isLSMHKBearish &&
|
||||||
@@ -9215,8 +9216,7 @@ private:
|
|||||||
//
|
//
|
||||||
bool isLSMHKShort =
|
bool isLSMHKShort =
|
||||||
//
|
//
|
||||||
(isLSMHKBearish ||
|
(isLSMHKSwitchedToBearish) &&
|
||||||
isLSMHKSwitchedToBearish) &&
|
|
||||||
isSSMHKBearish &&
|
isSSMHKBearish &&
|
||||||
isCSMHKBearish &&
|
isCSMHKBearish &&
|
||||||
isMSMHKBearish &&
|
isMSMHKBearish &&
|
||||||
@@ -9227,8 +9227,7 @@ private:
|
|||||||
//
|
//
|
||||||
bool isHSMHKShort =
|
bool isHSMHKShort =
|
||||||
//
|
//
|
||||||
(isHSMHKBearish ||
|
(isHSMHKSwitchedToBearish) &&
|
||||||
isHSMHKSwitchedToBearish) &&
|
|
||||||
isSSMHKBearish &&
|
isSSMHKBearish &&
|
||||||
isCSMHKBearish &&
|
isCSMHKBearish &&
|
||||||
isMSMHKBearish &&
|
isMSMHKBearish &&
|
||||||
|
|||||||
@@ -422,35 +422,43 @@ public:
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
string mSymbols[];
|
int signalsCount = ArraySize(signals);
|
||||||
XSCPositionHolder *mHolders[];
|
if (IsValidSize(signalsCount))
|
||||||
int symbolsCount = FilterSymbolBasedPositions(
|
|
||||||
mSymbols,
|
|
||||||
mHolders //
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
for (int i = 0; i < symbolsCount; i++)
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
string iSymbol = mSymbols[i];
|
Print("Cnverts " + ToString(signalsCount) + " Signal using SupRes ...");
|
||||||
XSCPositionHolder *iHolder = mHolders[i];
|
|
||||||
|
|
||||||
//
|
|
||||||
// We Can Select Multiple Positions for Place EQM Supports ...
|
|
||||||
|
|
||||||
//
|
|
||||||
// Select Max In Drawdown Position and Protect it ...
|
|
||||||
XPosition iSelectedPosition;
|
|
||||||
bool iHasPosition = iHolder.GetMaxInDrawdown(iSelectedPosition);
|
|
||||||
if (iHasPosition)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// Try to Protect Max In Drawdown Positions Position ...
|
|
||||||
PlaceEQMOrders(iSelectedPosition);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// //
|
||||||
|
// string mSymbols[];
|
||||||
|
// XSCPositionHolder *mHolders[];
|
||||||
|
// int symbolsCount = FilterSymbolBasedPositions(
|
||||||
|
// mSymbols,
|
||||||
|
// mHolders //
|
||||||
|
// );
|
||||||
|
|
||||||
|
// //
|
||||||
|
// for (int i = 0; i < symbolsCount; i++)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// string iSymbol = mSymbols[i];
|
||||||
|
// XSCPositionHolder *iHolder = mHolders[i];
|
||||||
|
|
||||||
|
// //
|
||||||
|
// // We Can Select Multiple Positions for Place EQM Supports ...
|
||||||
|
|
||||||
|
// //
|
||||||
|
// // Select Max In Drawdown Position and Protect it ...
|
||||||
|
// XPosition iSelectedPosition;
|
||||||
|
// bool iHasPosition = iHolder.GetMaxInDrawdown(iSelectedPosition);
|
||||||
|
// if (iHasPosition)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// // Try to Protect Max In Drawdown Positions Position ...
|
||||||
|
// PlaceEQMOrders(iSelectedPosition);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -722,10 +730,10 @@ public:
|
|||||||
// TODO:
|
// TODO:
|
||||||
// Make them Configurable ...
|
// Make them Configurable ...
|
||||||
int maxTrailTPs = 5;
|
int maxTrailTPs = 5;
|
||||||
int levelsOnClose = 6;
|
// int levelsOnClose = 6;
|
||||||
int riskFreeLevel = 2;
|
int riskFreeLevel = 4;
|
||||||
int requiredAgeForTrail = 0;
|
int requiredAgeForTrail = 0;
|
||||||
int requiredDistanceForTrail = 20;
|
int requiredDistanceForTrail = 10;
|
||||||
|
|
||||||
//
|
//
|
||||||
int positionsCount = ArraySize(positions);
|
int positionsCount = ArraySize(positions);
|
||||||
@@ -747,7 +755,9 @@ public:
|
|||||||
//
|
//
|
||||||
bool canManageState =
|
bool canManageState =
|
||||||
//
|
//
|
||||||
iPosition.provider != XEQMSupportToken
|
iPosition.provider != XEQMSupportToken
|
||||||
|
// &&
|
||||||
|
// iPosition.provider != "WSC"
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -785,6 +795,7 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Check Position Profit Distance ...
|
// Check Position Profit Distance ...
|
||||||
|
// double reward = MathAbs(iPosition.tp - iPosition.entry);
|
||||||
double priceDistanceInPoint = PriceToPoint(iPosition.profit / iPosition.volume, iPosition.symbol);
|
double priceDistanceInPoint = PriceToPoint(iPosition.profit / iPosition.volume, iPosition.symbol);
|
||||||
double priceDistance = PointToPrice(priceDistanceInPoint, iPosition.symbol);
|
double priceDistance = PointToPrice(priceDistanceInPoint, iPosition.symbol);
|
||||||
if (priceDistance < requiredDistanceForTrail)
|
if (priceDistance < requiredDistanceForTrail)
|
||||||
@@ -874,6 +885,10 @@ public:
|
|||||||
: iPosition.sl
|
: iPosition.sl
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
if (riskFreeLevel > 0 && trail.level > riskFreeLevel)
|
||||||
|
{
|
||||||
|
appliedSL = slDiff;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
double sl =
|
double sl =
|
||||||
@@ -1113,7 +1128,8 @@ public:
|
|||||||
//
|
//
|
||||||
// dont Manage NON Signal Provider's signals ...
|
// dont Manage NON Signal Provider's signals ...
|
||||||
string provider = iSignal.provider;
|
string provider = iSignal.provider;
|
||||||
if (!IsValid(provider))
|
bool canIgnore = !IsValid(provider) || provider == "EQM";
|
||||||
|
if (canIgnore)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
AddRef(
|
AddRef(
|
||||||
@@ -1161,7 +1177,7 @@ public:
|
|||||||
//
|
//
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (positionsCount < 2)
|
else if (positionsCount < 4)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Next Signal in a While of Specific Provider ...
|
// Next Signal in a While of Specific Provider ...
|
||||||
@@ -1185,6 +1201,11 @@ public:
|
|||||||
signals //
|
signals //
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// //
|
||||||
|
// if (youngest.profit > 0)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,20 +31,20 @@
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Inputs ...
|
// Inputs ...
|
||||||
long x121EAMagicNumber = 78692110; // Magic Number
|
long x121EAMagicNumber = 78692110; // Magic Number
|
||||||
int x121EASlippage = 10; // Slippgae
|
int x121EASlippage = 10; // Slippgae
|
||||||
string x121EASymbols = "EURUSDb,USDCHFb,GBPUSDb"; // Symbols
|
string x121EASymbols = "EURUSDb"; // Symbols
|
||||||
//
|
//
|
||||||
bool x121EAAllowLong = true; // Allow Long Trades
|
bool x121EAAllowLong = true; // Allow Long Trades
|
||||||
bool x121EAAllowShort = true; // Allow Short Trades
|
bool x121EAAllowShort = true; // Allow Short Trades
|
||||||
int x121EAManageInterval = 0; // Manager Check Intervals Seconds
|
int x121EAManageInterval = 0; // Manager Check Intervals Seconds
|
||||||
int x121EAMaxAllowedPositions = 5; // Max Allowed Positions
|
int x121EAMaxAllowedPositions = 10; // Max Allowed Positions
|
||||||
double x121EAMaxAllowedSpread = 0; // Max Allowed Spred for Opening Trades
|
double x121EAMaxAllowedSpread = 0; // Max Allowed Spred for Opening Trades
|
||||||
double x121EAMinProfitPerTrade = 3; // Min Profit Per Trade based On Volume Factor (Hedge)
|
double x121EAMinProfitPerTrade = 1; // Min Profit Per Trade based On Volume Factor (Hedge)
|
||||||
double x121EAMinProfitPerVolumeFactor = 0.01; // Min Volume Factor for Calculating Profit (Hedge)
|
double x121EAMinProfitPerVolumeFactor = 0.01; // Min Volume Factor for Calculating Profit (Hedge)
|
||||||
double x121EAMaxAllowedDrawdownFactor = 0.003; // Max Allowed Drawdown Factor
|
double x121EAMaxAllowedDrawdownFactor = 0.005; // Max Allowed Drawdown Factor
|
||||||
//
|
//
|
||||||
double x121EAVolume = 0.01;
|
double x121EAVolume = 0.05;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Vars ...
|
// Vars ...
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ int OnInit()
|
|||||||
// DeInitialization ...
|
// DeInitialization ...
|
||||||
void OnDeinit(const int reason)
|
void OnDeinit(const int reason)
|
||||||
{
|
{
|
||||||
Comment("");
|
// Comment("");
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -330,8 +330,8 @@ void CalculateBuffers(int bar_index)
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Commenting ...
|
// Commenting ...
|
||||||
string comment = GenerateDescriptionComment();
|
// string comment = GenerateDescriptionComment();
|
||||||
Comment(comment);
|
// Comment(comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user