last ... Om EURUSD ...
This commit is contained in:
@@ -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