last ... Om EURUSD ...
This commit is contained in:
@@ -102,6 +102,7 @@ public:
|
||||
XPVInputs pvInputs;
|
||||
XHKInputs hkInputs;
|
||||
XMCInputs mcInputs;
|
||||
XMRBInputs mrbInputs;
|
||||
XICHInputs ichInputs;
|
||||
XCHEInputs cheInputs;
|
||||
XSTRInputs strInputs;
|
||||
@@ -159,6 +160,10 @@ public:
|
||||
{
|
||||
hkInputs.Default();
|
||||
}
|
||||
if (!mrbInputs.IsValid())
|
||||
{
|
||||
mrbInputs.Default();
|
||||
}
|
||||
if (!cheInputs.IsValid())
|
||||
{
|
||||
cheInputs.Default();
|
||||
@@ -189,6 +194,7 @@ public:
|
||||
cMarketInputs.zgInputs = this.zgInputs;
|
||||
cMarketInputs.mcInputs = this.mcInputs;
|
||||
cMarketInputs.hkInputs = this.hkInputs;
|
||||
cMarketInputs.mrbInputs = this.mrbInputs;
|
||||
cMarketInputs.strInputs = this.strInputs;
|
||||
cMarketInputs.oscInputs = this.oscInputs;
|
||||
cMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -214,6 +220,7 @@ public:
|
||||
sMarketInputs.zgInputs = this.zgInputs;
|
||||
sMarketInputs.mcInputs = this.mcInputs;
|
||||
sMarketInputs.hkInputs = this.hkInputs;
|
||||
sMarketInputs.mrbInputs = this.mrbInputs;
|
||||
sMarketInputs.strInputs = this.strInputs;
|
||||
sMarketInputs.oscInputs = this.oscInputs;
|
||||
sMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -239,6 +246,7 @@ public:
|
||||
mMarketInputs.zgInputs = this.zgInputs;
|
||||
mMarketInputs.mcInputs = this.mcInputs;
|
||||
mMarketInputs.hkInputs = this.hkInputs;
|
||||
mMarketInputs.mrbInputs = this.mrbInputs;
|
||||
mMarketInputs.strInputs = this.strInputs;
|
||||
mMarketInputs.oscInputs = this.oscInputs;
|
||||
mMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -264,6 +272,7 @@ public:
|
||||
lMarketInputs.zgInputs = this.zgInputs;
|
||||
lMarketInputs.mcInputs = this.mcInputs;
|
||||
lMarketInputs.hkInputs = this.hkInputs;
|
||||
lMarketInputs.mrbInputs = this.mrbInputs;
|
||||
lMarketInputs.strInputs = this.strInputs;
|
||||
lMarketInputs.oscInputs = this.oscInputs;
|
||||
lMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -289,6 +298,7 @@ public:
|
||||
hMarketInputs.zgInputs = this.zgInputs;
|
||||
hMarketInputs.mcInputs = this.mcInputs;
|
||||
hMarketInputs.hkInputs = this.hkInputs;
|
||||
hMarketInputs.mrbInputs = this.mrbInputs;
|
||||
hMarketInputs.strInputs = this.strInputs;
|
||||
hMarketInputs.oscInputs = this.oscInputs;
|
||||
hMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -339,6 +349,7 @@ public:
|
||||
pvInputs.IsValid() &&
|
||||
mcInputs.IsValid() &&
|
||||
hkInputs.IsValid() &&
|
||||
mrbInputs.IsValid() &&
|
||||
cheInputs.IsValid() &&
|
||||
strInputs.IsValid() &&
|
||||
donInputs.IsValid() &&
|
||||
@@ -392,6 +403,7 @@ public:
|
||||
pvInputs.Clean();
|
||||
mcInputs.Clean();
|
||||
hkInputs.Clean();
|
||||
mrbInputs.Clean();
|
||||
cheInputs.Clean();
|
||||
strInputs.Clean();
|
||||
donInputs.Clean();
|
||||
@@ -440,6 +452,7 @@ public:
|
||||
pvInputs.Default();
|
||||
mcInputs.Default();
|
||||
hkInputs.Default();
|
||||
mrbInputs.Default();
|
||||
cheInputs.Default();
|
||||
strInputs.Default();
|
||||
donInputs.Default();
|
||||
@@ -1210,7 +1223,7 @@ public:
|
||||
ENUM_TIMEFRAMES period = GetPeriod();
|
||||
double tpPoint = 60;
|
||||
double slPoint = 30;
|
||||
double volume = 0.01;
|
||||
double volume = GetStaticVolume() * signalPusher;
|
||||
double tpPrice = PointToPrice(
|
||||
tpPoint,
|
||||
symbol //
|
||||
@@ -1523,7 +1536,7 @@ public:
|
||||
mSupportResistances,
|
||||
count,
|
||||
step //
|
||||
);
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -4220,7 +4233,7 @@ private:
|
||||
}
|
||||
|
||||
//
|
||||
// Use XICH ...
|
||||
// Use XMRB ...
|
||||
bool X128HasSpecifiedLongSignal(
|
||||
X121MarketConditions &mConditions, //
|
||||
double &sl, // Provided SL ...
|
||||
@@ -4231,6 +4244,352 @@ private:
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Current Cycle ...
|
||||
|
||||
//
|
||||
bool isCMRBFastOverSlow =
|
||||
//
|
||||
mConditions.cMarketConditions.mrbFasts[1] > mConditions.cMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCMRBFastCrossedOverSlow =
|
||||
//
|
||||
mConditions.cMarketConditions.mrbFasts[1] > mConditions.cMarketConditions.mrbSlows[1] &&
|
||||
mConditions.cMarketConditions.mrbFasts[2] <= mConditions.cMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCMRBClosedOverFast =
|
||||
//
|
||||
mConditions.cMarketConditions.bars[1].close > mConditions.cMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// Short Cycle ...
|
||||
|
||||
//
|
||||
bool isSMRBFastOverSlow =
|
||||
//
|
||||
mConditions.sMarketConditions.mrbFasts[1] > mConditions.sMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSMRBFastCrossedOverSlow =
|
||||
//
|
||||
mConditions.sMarketConditions.mrbFasts[1] > mConditions.sMarketConditions.mrbSlows[1] &&
|
||||
mConditions.sMarketConditions.mrbFasts[2] <= mConditions.sMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSMRBClosedOverFast =
|
||||
//
|
||||
mConditions.sMarketConditions.bars[1].close > mConditions.sMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// Medium Cycle ...
|
||||
|
||||
//
|
||||
bool isMMRBFastOverSlow =
|
||||
//
|
||||
mConditions.mMarketConditions.mrbFasts[1] > mConditions.mMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMMRBFastCrossedOverSlow =
|
||||
//
|
||||
mConditions.mMarketConditions.mrbFasts[1] > mConditions.mMarketConditions.mrbSlows[1] &&
|
||||
mConditions.mMarketConditions.mrbFasts[2] <= mConditions.mMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMMRBClosedOverFast =
|
||||
//
|
||||
mConditions.mMarketConditions.bars[1].close > mConditions.mMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// Long Cycle ...
|
||||
|
||||
//
|
||||
bool isLMRBFastOverSlow =
|
||||
//
|
||||
mConditions.lMarketConditions.mrbFasts[1] > mConditions.lMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLMRBFastCrossedOverSlow =
|
||||
//
|
||||
mConditions.lMarketConditions.mrbFasts[1] > mConditions.lMarketConditions.mrbSlows[1] &&
|
||||
mConditions.lMarketConditions.mrbFasts[2] <= mConditions.lMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLMRBClosedOverFast =
|
||||
//
|
||||
mConditions.lMarketConditions.bars[1].close > mConditions.lMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// Hind Cycle ...
|
||||
|
||||
//
|
||||
bool isHMRBFastOverSlow =
|
||||
//
|
||||
mConditions.hMarketConditions.mrbFasts[1] > mConditions.hMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHMRBFastCrossedOverSlow =
|
||||
//
|
||||
mConditions.hMarketConditions.mrbFasts[1] > mConditions.hMarketConditions.mrbSlows[1] &&
|
||||
mConditions.hMarketConditions.mrbFasts[2] <= mConditions.hMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHMRBClosedOverFast =
|
||||
//
|
||||
mConditions.hMarketConditions.bars[1].close > mConditions.hMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMRBLongWeight =
|
||||
//
|
||||
(
|
||||
//
|
||||
isCMRBFastOverSlow &&
|
||||
isSMRBFastOverSlow &&
|
||||
isMMRBFastOverSlow &&
|
||||
isLMRBFastOverSlow &&
|
||||
isHMRBFastOverSlow
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
isCMRBFastOverSlow &&
|
||||
((
|
||||
isSMRBFastOverSlow &&
|
||||
isMMRBFastOverSlow &&
|
||||
isLMRBFastOverSlow)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBFastOverSlow &&
|
||||
isLMRBFastOverSlow &&
|
||||
isHMRBFastOverSlow)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isMMRBFastOverSlow &&
|
||||
isLMRBFastOverSlow &&
|
||||
isHMRBFastOverSlow))
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMBRCloseLong =
|
||||
//
|
||||
(
|
||||
//
|
||||
isCMRBClosedOverFast &&
|
||||
isSMRBClosedOverFast &&
|
||||
isMMRBClosedOverFast &&
|
||||
isLMRBClosedOverFast &&
|
||||
isHMRBClosedOverFast
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
isCMRBClosedOverFast &&
|
||||
((
|
||||
isSMRBClosedOverFast &&
|
||||
isMMRBClosedOverFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBClosedOverFast &&
|
||||
isLMRBClosedOverFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBClosedOverFast &&
|
||||
isHMRBClosedOverFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isMMRBClosedOverFast &&
|
||||
isLMRBClosedOverFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isLMRBClosedOverFast &&
|
||||
isHMRBClosedOverFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isMMRBClosedOverFast &&
|
||||
isHMRBClosedOverFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBClosedOverFast &&
|
||||
isMMRBClosedOverFast &&
|
||||
isLMRBClosedOverFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBClosedOverFast &&
|
||||
isLMRBClosedOverFast &&
|
||||
isHMRBClosedOverFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isMMRBClosedOverFast &&
|
||||
isLMRBClosedOverFast &&
|
||||
isHMRBClosedOverFast))
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCMRBShort =
|
||||
//
|
||||
(isCMRBFastOverSlow ||
|
||||
isCMRBFastCrossedOverSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isCMRBClosedOverFast &&
|
||||
//
|
||||
isMRBLongWeight &&
|
||||
//
|
||||
isMBRCloseLong
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSMRBShort =
|
||||
//
|
||||
(isSMRBFastOverSlow ||
|
||||
isSMRBFastCrossedOverSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isSMRBClosedOverFast &&
|
||||
//
|
||||
isMRBLongWeight &&
|
||||
//
|
||||
isMBRCloseLong
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMMRBShort =
|
||||
//
|
||||
(isMMRBFastOverSlow ||
|
||||
isMMRBFastCrossedOverSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isMMRBClosedOverFast &&
|
||||
//
|
||||
isMRBLongWeight &&
|
||||
//
|
||||
isMBRCloseLong
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLMRBShort =
|
||||
//
|
||||
(isLMRBFastOverSlow ||
|
||||
isLMRBFastCrossedOverSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isLMRBClosedOverFast &&
|
||||
//
|
||||
isMRBLongWeight &&
|
||||
//
|
||||
isMBRCloseLong
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHMRBShort =
|
||||
//
|
||||
(isHMRBFastOverSlow ||
|
||||
isHMRBFastCrossedOverSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isHMRBClosedOverFast &&
|
||||
//
|
||||
isMRBLongWeight &&
|
||||
//
|
||||
isMBRCloseLong
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
isCMRBShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isSMRBShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isMMRBShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isLMRBShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isHMRBShort
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
@@ -4836,7 +5195,7 @@ private:
|
||||
}
|
||||
|
||||
//
|
||||
// Use XICH ...
|
||||
// Use XMRB ...
|
||||
bool X128HasSpecifiedShortSignal(
|
||||
X121MarketConditions &mConditions, //
|
||||
double &sl, // Provided SL ...
|
||||
@@ -4847,6 +5206,352 @@ private:
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Current Cycle ...
|
||||
|
||||
//
|
||||
bool isCMRBFastUnderSlow =
|
||||
//
|
||||
mConditions.cMarketConditions.mrbFasts[1] < mConditions.cMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCMRBFastCrossedUnderSlow =
|
||||
//
|
||||
mConditions.cMarketConditions.mrbFasts[1] < mConditions.cMarketConditions.mrbSlows[1] &&
|
||||
mConditions.cMarketConditions.mrbFasts[2] >= mConditions.cMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCMRBClosedUnderFast =
|
||||
//
|
||||
mConditions.cMarketConditions.bars[1].close < mConditions.cMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// Short Cycle ...
|
||||
|
||||
//
|
||||
bool isSMRBFastUnderSlow =
|
||||
//
|
||||
mConditions.sMarketConditions.mrbFasts[1] < mConditions.sMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSMRBFastCrossedUnderSlow =
|
||||
//
|
||||
mConditions.sMarketConditions.mrbFasts[1] < mConditions.sMarketConditions.mrbSlows[1] &&
|
||||
mConditions.sMarketConditions.mrbFasts[2] >= mConditions.sMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSMRBClosedUnderFast =
|
||||
//
|
||||
mConditions.sMarketConditions.bars[1].close < mConditions.sMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// Medium Cycle ...
|
||||
|
||||
//
|
||||
bool isMMRBFastUnderSlow =
|
||||
//
|
||||
mConditions.mMarketConditions.mrbFasts[1] < mConditions.mMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMMRBFastCrossedUnderSlow =
|
||||
//
|
||||
mConditions.mMarketConditions.mrbFasts[1] < mConditions.mMarketConditions.mrbSlows[1] &&
|
||||
mConditions.mMarketConditions.mrbFasts[2] >= mConditions.mMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMMRBClosedUnderFast =
|
||||
//
|
||||
mConditions.mMarketConditions.bars[1].close < mConditions.mMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// Long Cycle ...
|
||||
|
||||
//
|
||||
bool isLMRBFastUnderSlow =
|
||||
//
|
||||
mConditions.lMarketConditions.mrbFasts[1] < mConditions.lMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLMRBFastCrossedUnderSlow =
|
||||
//
|
||||
mConditions.lMarketConditions.mrbFasts[1] < mConditions.lMarketConditions.mrbSlows[1] &&
|
||||
mConditions.lMarketConditions.mrbFasts[2] >= mConditions.lMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLMRBClosedUnderFast =
|
||||
//
|
||||
mConditions.lMarketConditions.bars[1].close < mConditions.lMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// Hind Cycle ...
|
||||
|
||||
//
|
||||
bool isHMRBFastUnderSlow =
|
||||
//
|
||||
mConditions.hMarketConditions.mrbFasts[1] < mConditions.hMarketConditions.mrbSlows[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHMRBFastCrossedUnderSlow =
|
||||
//
|
||||
mConditions.hMarketConditions.mrbFasts[1] < mConditions.hMarketConditions.mrbSlows[1] &&
|
||||
mConditions.hMarketConditions.mrbFasts[2] >= mConditions.hMarketConditions.mrbSlows[2]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHMRBClosedUnderFast =
|
||||
//
|
||||
mConditions.hMarketConditions.bars[1].close < mConditions.hMarketConditions.mrbFasts[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMRBShortWeight =
|
||||
//
|
||||
(
|
||||
//
|
||||
isCMRBFastUnderSlow &&
|
||||
isSMRBFastUnderSlow &&
|
||||
isMMRBFastUnderSlow &&
|
||||
isLMRBFastUnderSlow &&
|
||||
isHMRBFastUnderSlow
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
isCMRBFastUnderSlow &&
|
||||
((
|
||||
isSMRBFastUnderSlow &&
|
||||
isMMRBFastUnderSlow &&
|
||||
isLMRBFastUnderSlow)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBFastUnderSlow &&
|
||||
isLMRBFastUnderSlow &&
|
||||
isHMRBFastUnderSlow)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isMMRBFastUnderSlow &&
|
||||
isLMRBFastUnderSlow &&
|
||||
isHMRBFastUnderSlow))
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMBRCloseShort =
|
||||
//
|
||||
(
|
||||
//
|
||||
isCMRBClosedUnderFast &&
|
||||
isSMRBClosedUnderFast &&
|
||||
isMMRBClosedUnderFast &&
|
||||
isLMRBClosedUnderFast &&
|
||||
isHMRBClosedUnderFast
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
isCMRBClosedUnderFast &&
|
||||
((
|
||||
isSMRBClosedUnderFast &&
|
||||
isMMRBClosedUnderFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBClosedUnderFast &&
|
||||
isLMRBClosedUnderFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBClosedUnderFast &&
|
||||
isHMRBClosedUnderFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isMMRBClosedUnderFast &&
|
||||
isLMRBClosedUnderFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isLMRBClosedUnderFast &&
|
||||
isHMRBClosedUnderFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isMMRBClosedUnderFast &&
|
||||
isHMRBClosedUnderFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBClosedUnderFast &&
|
||||
isMMRBClosedUnderFast &&
|
||||
isLMRBClosedUnderFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isSMRBClosedUnderFast &&
|
||||
isLMRBClosedUnderFast &&
|
||||
isHMRBClosedUnderFast)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
isMMRBClosedUnderFast &&
|
||||
isLMRBClosedUnderFast &&
|
||||
isHMRBClosedUnderFast))
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCMRBShort =
|
||||
//
|
||||
(isCMRBFastUnderSlow ||
|
||||
isCMRBFastCrossedUnderSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isCMRBClosedUnderFast &&
|
||||
//
|
||||
isMRBShortWeight &&
|
||||
//
|
||||
isMBRCloseShort
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSMRBShort =
|
||||
//
|
||||
(isSMRBFastUnderSlow ||
|
||||
isSMRBFastCrossedUnderSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isSMRBClosedUnderFast &&
|
||||
//
|
||||
isMRBShortWeight &&
|
||||
//
|
||||
isMBRCloseShort
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMMRBShort =
|
||||
//
|
||||
(isMMRBFastUnderSlow ||
|
||||
isMMRBFastCrossedUnderSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isMMRBClosedUnderFast &&
|
||||
//
|
||||
isMRBShortWeight &&
|
||||
//
|
||||
isMBRCloseShort
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLMRBShort =
|
||||
//
|
||||
(isLMRBFastUnderSlow ||
|
||||
isLMRBFastCrossedUnderSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isLMRBClosedUnderFast &&
|
||||
//
|
||||
isMRBShortWeight &&
|
||||
//
|
||||
isMBRCloseShort
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHMRBShort =
|
||||
//
|
||||
(isHMRBFastUnderSlow ||
|
||||
isHMRBFastCrossedUnderSlow)
|
||||
//
|
||||
&&
|
||||
//
|
||||
isHMRBClosedUnderFast &&
|
||||
//
|
||||
isMRBShortWeight &&
|
||||
//
|
||||
isMBRCloseShort
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
isCMRBShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isSMRBShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isMMRBShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isLMRBShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isHMRBShort
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "../Helpers/x-saherelm.xmc.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xpv.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xzg.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xmrb.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xdon.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xche.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xosc.helper.mq5"
|
||||
@@ -77,13 +78,14 @@ public:
|
||||
//
|
||||
XHKInputs hkInputs; // HK Inputs ...
|
||||
XMCInputs mcInputs; // MC Inputs ...
|
||||
XPVInputs pvInputs; // XPV Inputs ...
|
||||
XZGInputs zgInputs; // XZG Inputs ...
|
||||
XPVInputs pvInputs; // PV Inputs ...
|
||||
XZGInputs zgInputs; // ZG Inputs ...
|
||||
XMRBInputs mrbInputs; // MRB Inputs ...
|
||||
XSTRInputs strInputs; // STR Inputs ...
|
||||
XOSCInputs oscInputs; // OSC Inputs ...
|
||||
XCHEInputs cheInputs; // CHE Inputs ...
|
||||
XICHInputs ichInputs; // ICH Inputs ...
|
||||
XDONInputs donInputs; // XDON Inputs ...
|
||||
XDONInputs donInputs; // DON Inputs ...
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
@@ -132,6 +134,7 @@ public:
|
||||
mcInputs.Default();
|
||||
pvInputs.Default();
|
||||
zgInputs.Default();
|
||||
mrbInputs.Default();
|
||||
strInputs.Default();
|
||||
oscInputs.Default();
|
||||
cheInputs.Default();
|
||||
@@ -158,13 +161,14 @@ public:
|
||||
ENUM_X_MARKET_CYCLES mCycle, // Init Cycle
|
||||
XHKInputs &mHkInputs, // HK Inputs
|
||||
XMCInputs &mMcInputs, // MC Inputs
|
||||
XPVInputs &mPvInputs, // XPV Inputs ...
|
||||
XZGInputs &mZgInputs, // XZG Inputs ...
|
||||
XPVInputs &mPvInputs, // PV Inputs ...
|
||||
XZGInputs &mZgInputs, // ZG Inputs ...
|
||||
XMRBInputs &mMrbInputs, // MRB Inputs ...
|
||||
XSTRInputs &mStrInputs, // STR Inputs
|
||||
XOSCInputs &mOscInputs, // OSC Inputs
|
||||
XCHEInputs &mCheInputs, // CHE Inputs
|
||||
XICHInputs &mIchInputs, // ICH Inputs ...
|
||||
XDONInputs &mDonInputs, // XDON Inputs ...
|
||||
XDONInputs &mDonInputs, // DON Inputs ...
|
||||
int mHostBarIndex = 0, // Specified Host Period Bar Index
|
||||
string mPrefix = "" // Prefix
|
||||
)
|
||||
@@ -191,6 +195,7 @@ public:
|
||||
mcInputs = mMcInputs;
|
||||
pvInputs = mPvInputs;
|
||||
zgInputs = mZgInputs;
|
||||
mrbInputs = mMrbInputs;
|
||||
strInputs = mStrInputs;
|
||||
oscInputs = mOscInputs;
|
||||
cheInputs = mCheInputs;
|
||||
@@ -220,6 +225,7 @@ public:
|
||||
mcInputs.Clean();
|
||||
pvInputs.Clean();
|
||||
zgInputs.Clean();
|
||||
mrbInputs.Clean();
|
||||
strInputs.Clean();
|
||||
oscInputs.Clean();
|
||||
cheInputs.Clean();
|
||||
@@ -249,6 +255,7 @@ public:
|
||||
mcInputs.Default();
|
||||
pvInputs.Default();
|
||||
zgInputs.Default();
|
||||
mrbInputs.Default();
|
||||
strInputs.Default();
|
||||
oscInputs.Default();
|
||||
cheInputs.Default();
|
||||
@@ -305,6 +312,13 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = mrbInputs.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = strInputs.IsValid();
|
||||
if (!result)
|
||||
@@ -359,6 +373,7 @@ public:
|
||||
result = MathMax(result, mcInputs.Max());
|
||||
result = MathMax(result, pvInputs.Max());
|
||||
result = MathMax(result, zgInputs.Max());
|
||||
result = MathMax(result, mrbInputs.Max());
|
||||
result = MathMax(result, strInputs.Max());
|
||||
result = MathMax(result, oscInputs.Max());
|
||||
result = MathMax(result, cheInputs.Max());
|
||||
@@ -430,6 +445,27 @@ public:
|
||||
double zigzags[];
|
||||
double zigzagPVs[];
|
||||
|
||||
//
|
||||
// XMRB ...
|
||||
|
||||
//
|
||||
double mrbFasts[];
|
||||
double mrb1Fasts[];
|
||||
double mrb2Fasts[];
|
||||
double mrb3Fasts[];
|
||||
double mrb4Fasts[];
|
||||
double mrb5Fasts[];
|
||||
double mrb6Fasts[];
|
||||
|
||||
//
|
||||
double mrbSlows[];
|
||||
double mrb1Slows[];
|
||||
double mrb2Slows[];
|
||||
double mrb3Slows[];
|
||||
double mrb4Slows[];
|
||||
double mrb5Slows[];
|
||||
double mrb6Slows[];
|
||||
|
||||
//
|
||||
// XCHE ...
|
||||
double cheLongExit1s[];
|
||||
@@ -1014,6 +1050,15 @@ public:
|
||||
// %K, %D < 20 --> %K > %D = take profit
|
||||
bool isStochKDOver80;
|
||||
|
||||
//
|
||||
// XMR ...
|
||||
bool isMRBFastOverSlow;
|
||||
bool isMRBFastCrossedOverSlow;
|
||||
bool isMRBCloseOverFast;
|
||||
bool isMRBFastUnderSlow;
|
||||
bool isMRBFastCrossedUnderSlow;
|
||||
bool isMRBCloseUnderSlow;
|
||||
|
||||
//
|
||||
// Tools ...
|
||||
|
||||
@@ -1081,6 +1126,20 @@ public:
|
||||
Clean(oscStddevs);
|
||||
Clean(zigzags);
|
||||
Clean(zigzagPVs);
|
||||
Clean(mrbFasts);
|
||||
Clean(mrb1Fasts);
|
||||
Clean(mrb2Fasts);
|
||||
Clean(mrb3Fasts);
|
||||
Clean(mrb4Fasts);
|
||||
Clean(mrb5Fasts);
|
||||
Clean(mrb6Fasts);
|
||||
Clean(mrbSlows);
|
||||
Clean(mrb1Slows);
|
||||
Clean(mrb2Slows);
|
||||
Clean(mrb3Slows);
|
||||
Clean(mrb4Slows);
|
||||
Clean(mrb5Slows);
|
||||
Clean(mrb6Slows);
|
||||
Clean(donUpperOs);
|
||||
Clean(donLowerOs);
|
||||
Clean(donUpperCs);
|
||||
@@ -1143,6 +1202,20 @@ public:
|
||||
ArraySetAsSeries(oscStddevs, true);
|
||||
ArraySetAsSeries(zigzags, true);
|
||||
ArraySetAsSeries(zigzagPVs, true);
|
||||
ArraySetAsSeries(mrbFasts, true);
|
||||
ArraySetAsSeries(mrb1Fasts, true);
|
||||
ArraySetAsSeries(mrb2Fasts, true);
|
||||
ArraySetAsSeries(mrb3Fasts, true);
|
||||
ArraySetAsSeries(mrb4Fasts, true);
|
||||
ArraySetAsSeries(mrb5Fasts, true);
|
||||
ArraySetAsSeries(mrb6Fasts, true);
|
||||
ArraySetAsSeries(mrbSlows, true);
|
||||
ArraySetAsSeries(mrb1Slows, true);
|
||||
ArraySetAsSeries(mrb2Slows, true);
|
||||
ArraySetAsSeries(mrb3Slows, true);
|
||||
ArraySetAsSeries(mrb4Slows, true);
|
||||
ArraySetAsSeries(mrb5Slows, true);
|
||||
ArraySetAsSeries(mrb6Slows, true);
|
||||
ArraySetAsSeries(donUpperOs, true);
|
||||
ArraySetAsSeries(donLowerOs, true);
|
||||
ArraySetAsSeries(donUpperCs, true);
|
||||
@@ -1340,6 +1413,15 @@ public:
|
||||
isStochKDOver50 = false;
|
||||
isStochKDUnder20 = false;
|
||||
isStochKDOver80 = false;
|
||||
|
||||
//
|
||||
// XMR ...
|
||||
isMRBFastOverSlow = false;
|
||||
isMRBFastCrossedOverSlow = false;
|
||||
isMRBCloseOverFast = false;
|
||||
isMRBFastUnderSlow = false;
|
||||
isMRBFastCrossedUnderSlow = false;
|
||||
isMRBCloseUnderSlow = false;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2161,6 +2243,40 @@ public:
|
||||
bearScore++;
|
||||
}
|
||||
|
||||
//
|
||||
// XMR ...
|
||||
if (isMRBFastOverSlow)
|
||||
{
|
||||
bullScore++;
|
||||
}
|
||||
if (isMRBFastCrossedOverSlow)
|
||||
{
|
||||
//
|
||||
bullScore++;
|
||||
bearScore--;
|
||||
}
|
||||
if (isMRBCloseOverFast)
|
||||
{
|
||||
//
|
||||
bullScore++;
|
||||
bearScore--;
|
||||
}
|
||||
if (isMRBFastUnderSlow)
|
||||
{
|
||||
bearScore++;
|
||||
}
|
||||
if (isMRBFastCrossedUnderSlow)
|
||||
{
|
||||
//
|
||||
bullScore--;
|
||||
bearScore++;
|
||||
}
|
||||
if (isMRBCloseUnderSlow)
|
||||
{
|
||||
bullScore--;
|
||||
bearScore++;
|
||||
}
|
||||
|
||||
//
|
||||
bullishScore = bullScore * multiplier;
|
||||
bearishScore = bearScore * multiplier;
|
||||
@@ -2330,6 +2446,21 @@ public:
|
||||
;
|
||||
zigzagStr = SetLabel("XZG: ", zigzagStr, separator);
|
||||
|
||||
//
|
||||
// XMR ...
|
||||
string mrbStr =
|
||||
//
|
||||
ToString("isMRBFastOverSlow", isMRBFastOverSlow, ignoreFalseConditions) +
|
||||
ToString("isMRBFastCrossedOverSlow", isMRBFastCrossedOverSlow, ignoreFalseConditions) +
|
||||
ToString("isMRBCloseOverFast", isMRBCloseOverFast, ignoreFalseConditions) +
|
||||
ToString("isMRBFastUnderSlow", isMRBFastUnderSlow, ignoreFalseConditions) +
|
||||
ToString("isMRBFastCrossedUnderSlow", isMRBFastCrossedUnderSlow, ignoreFalseConditions) +
|
||||
ToString("isMRBCloseUnderSlow", isMRBCloseUnderSlow, ignoreFalseConditions) +
|
||||
""
|
||||
//
|
||||
;
|
||||
mrbStr = SetLabel("XMRB: ", mrbStr, separator);
|
||||
|
||||
//
|
||||
// XSTR ...
|
||||
string strStr =
|
||||
@@ -2609,6 +2740,7 @@ public:
|
||||
? ""
|
||||
: hkStr +
|
||||
zigzagStr +
|
||||
mrbStr +
|
||||
strStr +
|
||||
cheStr +
|
||||
donStr +
|
||||
@@ -2680,6 +2812,7 @@ public:
|
||||
XSCXMCHelper mc;
|
||||
XSCXPVHelper pv;
|
||||
XSCXZGHelper zg;
|
||||
XSCXMRBHelper mrb;
|
||||
XSCXSTRHelper str;
|
||||
XSCXCHEHelper che;
|
||||
XSCXOSCHelper osc;
|
||||
@@ -2997,6 +3130,153 @@ public:
|
||||
bool isZigZagInVale = conditions.zigzags[curr] > conditions.zigzagPVs[curr];
|
||||
conditions.isZigZagInVale = isZigZagInVale;
|
||||
|
||||
//
|
||||
// XMR ...
|
||||
|
||||
//
|
||||
mrb.CopyFast(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrbFasts //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR1Fast(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb1Fasts //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR2Fast(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb2Fasts //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR3Fast(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb3Fasts //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR4Fast(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb4Fasts //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR5Fast(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb5Fasts //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR6Fast(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb6Fasts //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopySlow(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrbSlows //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR1Slow(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb1Slows //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR2Slow(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb2Slows //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR3Slow(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb3Slows //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR4Slow(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb4Slows //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR5Slow(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb5Slows //
|
||||
);
|
||||
|
||||
//
|
||||
mrb.CopyR6Slow(
|
||||
barIndex,
|
||||
mNumberOfItems,
|
||||
conditions.mrb6Slows //
|
||||
);
|
||||
|
||||
//
|
||||
bool isMRBFastOverSlow =
|
||||
//
|
||||
conditions.mrbFasts[curr] > conditions.mrbSlows[curr] &&
|
||||
conditions.mrbFasts[prev] > conditions.mrbSlows[prev]
|
||||
//
|
||||
;
|
||||
bool isMRBFastCrossedOverSlow =
|
||||
//
|
||||
conditions.mrbFasts[curr] > conditions.mrbSlows[curr] &&
|
||||
conditions.mrbFasts[prev] <= conditions.mrbSlows[prev]
|
||||
//
|
||||
;
|
||||
bool isMRBCloseOverFast =
|
||||
//
|
||||
conditions.bars[prev].close > conditions.mrbFasts[prev] &&
|
||||
conditions.bars[curr].low > conditions.mrbFasts[prev]
|
||||
//
|
||||
;
|
||||
bool isMRBFastUnderSlow =
|
||||
//
|
||||
conditions.mrbFasts[curr] < conditions.mrbSlows[curr] &&
|
||||
conditions.mrbFasts[prev] < conditions.mrbSlows[prev]
|
||||
//
|
||||
;
|
||||
bool isMRBFastCrossedUnderSlow =
|
||||
//
|
||||
conditions.mrbFasts[curr] < conditions.mrbSlows[curr] &&
|
||||
conditions.mrbFasts[prev] >= conditions.mrbSlows[prev]
|
||||
//
|
||||
;
|
||||
bool isMRBCloseUnderSlow =
|
||||
//
|
||||
conditions.bars[prev].close < conditions.mrbSlows[prev] &&
|
||||
conditions.bars[curr].high < conditions.mrbSlows[prev]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
isMRBFastOverSlow = isMRBFastOverSlow;
|
||||
isMRBFastCrossedOverSlow = isMRBFastCrossedOverSlow;
|
||||
isMRBCloseOverFast = isMRBCloseOverFast;
|
||||
isMRBFastUnderSlow = isMRBFastUnderSlow;
|
||||
isMRBFastCrossedUnderSlow = isMRBFastCrossedUnderSlow;
|
||||
isMRBCloseUnderSlow = isMRBCloseUnderSlow;
|
||||
|
||||
//
|
||||
// XDON ...
|
||||
|
||||
@@ -4513,6 +4793,19 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XMRB ...
|
||||
result = mrb.Init(
|
||||
symbol,
|
||||
period,
|
||||
mInputs.mrbInputs
|
||||
//
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XSTR ...
|
||||
result = str.Init(
|
||||
|
||||
Reference in New Issue
Block a user