last ...
This commit is contained in:
@@ -32,12 +32,16 @@
|
||||
#include "../Helpers/x-saherelm.xpv.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xtd.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xhk.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xsln.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xstr.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xche.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xich.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xmrb.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xosc.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xvlm.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xhtd.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xatsl.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xdmnt.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xasct.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xsslc.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xhull.helper.mq5"
|
||||
@@ -70,6 +74,7 @@ enum ENUM_X121_SIGNAL_PROVIDER
|
||||
PROVIDER_XVLM = 17,
|
||||
PROVIDER_XPVF = 18,
|
||||
PROVIDER_XPVSAR = 19,
|
||||
PROVIDER_XHTSRD = 20,
|
||||
};
|
||||
|
||||
//
|
||||
@@ -202,6 +207,10 @@ ENUM_X121_SIGNAL_PROVIDER FromString(string value)
|
||||
{
|
||||
result = PROVIDER_XPVSAR;
|
||||
}
|
||||
else if (Contains(value, (EnumToString(PROVIDER_XHTSRD))))
|
||||
{
|
||||
result = PROVIDER_XHTSRD;
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -222,12 +231,16 @@ struct X121SetupInputs
|
||||
XPVInputs pvInputs; // XPV Inputs
|
||||
XTDInputs tdInputs; // XTD Inputs
|
||||
XHKInputs hkInputs; // XHK Inputs
|
||||
XHTDInputs htdInputs; // XHTD Inputs
|
||||
XCHEInputs cheInputs; // XCHE Inputs
|
||||
XICHInputs ichInputs; // XICH Inputs
|
||||
XSTRInputs strInputs; // XSTR Inputs
|
||||
XMRBInputs mrbInputs; // XMRB Inputs
|
||||
XOSCInputs oscInputs; // XOSC Inputs
|
||||
XVLMInputs vlmInputs; // XVLM Inputs
|
||||
XSLNInputs slnInputs; // XSLN Inputs
|
||||
XATSLInputs atslInputs; // XATSL Inputs
|
||||
XDMNTInputs dmntInputs; // XDMNT Inputs
|
||||
XASCTInputs asctInputs; // XASCT Inputs
|
||||
XSSLCInputs sslcInputs; // XSSLC Inputs
|
||||
XHULLInputs hullInputs; // XHULL Inputs
|
||||
@@ -259,12 +272,16 @@ struct X121SetupInputs
|
||||
XPVInputs &_pvInputs, // XPV Inputs
|
||||
XTDInputs &_tdInputs, // XTD Inputs
|
||||
XHKInputs &_hkInputs, // XHK Inputs
|
||||
XHTDInputs &_htdInputs, // XHTD Inputs
|
||||
XCHEInputs &_cheInputs, // XCHE Inputs
|
||||
XICHInputs &_ichInputs, // XICH Inputs
|
||||
XSTRInputs &_strInputs, // XSTR Inputs
|
||||
XMRBInputs &_mrbInputs, // XMRB Inputs
|
||||
XOSCInputs &_oscInputs, // XOSC Inputs
|
||||
XVLMInputs &_vlmInputs, // XVLM Inputs
|
||||
XSLNInputs &_slnInputs, // XSLN Inputs
|
||||
XATSLInputs &_atslInputs, // XATSL Inputs
|
||||
XDMNTInputs &_dmntInputs, // XDMNT Inputs
|
||||
XASCTInputs &_asctInputs, // XASCT Inputs
|
||||
XSSLCInputs &_sslcInputs, // XSSLC Inputs
|
||||
XHULLInputs &_hullInputs, // XHULL Inputs
|
||||
@@ -281,12 +298,15 @@ struct X121SetupInputs
|
||||
this.pvInputs = _pvInputs;
|
||||
this.tdInputs = _tdInputs;
|
||||
this.hkInputs = _hkInputs;
|
||||
this.htdInputs = _htdInputs;
|
||||
this.cheInputs = _cheInputs;
|
||||
this.ichInputs = _ichInputs;
|
||||
this.strInputs = _strInputs;
|
||||
this.mrbInputs = _mrbInputs;
|
||||
this.oscInputs = _oscInputs;
|
||||
this.vlmInputs = _vlmInputs;
|
||||
this.atslInputs = _atslInputs;
|
||||
this.dmntInputs = _dmntInputs;
|
||||
this.asctInputs = _asctInputs;
|
||||
this.sslcInputs = _sslcInputs;
|
||||
this.hullInputs = _hullInputs;
|
||||
@@ -321,9 +341,13 @@ struct X121SetupInputs
|
||||
mrbInputs.Clean();
|
||||
oscInputs.Clean();
|
||||
vlmInputs.Clean();
|
||||
slnInputs.Clean();
|
||||
htdInputs.Clean();
|
||||
asctInputs.Clean();
|
||||
sslcInputs.Clean();
|
||||
hullInputs.Clean();
|
||||
atslInputs.Clean();
|
||||
dmntInputs.Clean();
|
||||
adxtdInputs.Clean();
|
||||
}
|
||||
|
||||
@@ -342,9 +366,13 @@ struct X121SetupInputs
|
||||
mrbInputs.Default();
|
||||
oscInputs.Default();
|
||||
vlmInputs.Default();
|
||||
slnInputs.Default();
|
||||
htdInputs.Default();
|
||||
asctInputs.Default();
|
||||
sslcInputs.Default();
|
||||
hullInputs.Default();
|
||||
atslInputs.Default();
|
||||
dmntInputs.Default();
|
||||
adxtdInputs.Default();
|
||||
}
|
||||
|
||||
@@ -374,6 +402,13 @@ struct X121SetupInputs
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = slnInputs.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = pvInputs.IsValid();
|
||||
if (!result)
|
||||
@@ -465,6 +500,27 @@ struct X121SetupInputs
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = htdInputs.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = atslInputs.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = dmntInputs.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
@@ -491,9 +547,13 @@ struct X121SetupConditions
|
||||
XSTRConditions strConditions;
|
||||
XMRBConditions mrbConditions;
|
||||
XVLMConditions vlmConditions;
|
||||
XHTDConditions htdConditions;
|
||||
XSLNConditions slnConditions;
|
||||
XATSLConditions atslConditions;
|
||||
XASCTConditions asctConditions;
|
||||
XSSLCConditions sslcConditions;
|
||||
XHULLConditions hullConditions;
|
||||
XDMNTConditions dmntConditions;
|
||||
XADXTDConditions adxtdConditions;
|
||||
|
||||
//
|
||||
@@ -530,9 +590,13 @@ struct X121SetupConditions
|
||||
strConditions.Clean();
|
||||
mrbConditions.Clean();
|
||||
vlmConditions.Clean();
|
||||
slnConditions.Clean();
|
||||
htdConditions.Clean();
|
||||
atslConditions.Clean();
|
||||
asctConditions.Clean();
|
||||
sslcConditions.Clean();
|
||||
hullConditions.Clean();
|
||||
dmntConditions.Clean();
|
||||
adxtdConditions.Clean();
|
||||
}
|
||||
|
||||
@@ -566,6 +630,14 @@ struct X121SetupConditions
|
||||
bullishScore += tempBullishScore;
|
||||
bearishScore += tempBearishScore;
|
||||
|
||||
//
|
||||
slnConditions.GenerateScore(
|
||||
tempBullishScore,
|
||||
tempBearishScore //
|
||||
);
|
||||
bullishScore += tempBullishScore;
|
||||
bearishScore += tempBearishScore;
|
||||
|
||||
//
|
||||
adxtdConditions.GenerateScore(
|
||||
tempBullishScore,
|
||||
@@ -653,6 +725,32 @@ struct X121SetupConditions
|
||||
);
|
||||
bullishScore += tempBullishScore;
|
||||
bearishScore += tempBearishScore;
|
||||
|
||||
//
|
||||
htdConditions.GenerateScore(
|
||||
tempBullishScore,
|
||||
tempBearishScore //
|
||||
);
|
||||
bullishScore += tempBullishScore;
|
||||
bearishScore += tempBearishScore;
|
||||
|
||||
//
|
||||
atslConditions.GenerateScore(
|
||||
tempBullishScore,
|
||||
tempBearishScore //
|
||||
);
|
||||
bullishScore += tempBullishScore;
|
||||
bearishScore += tempBearishScore;
|
||||
|
||||
//
|
||||
dmntConditions.GenerateScore(
|
||||
tempBullishScore,
|
||||
tempBearishScore //
|
||||
);
|
||||
bullishScore += tempBullishScore;
|
||||
bearishScore += tempBearishScore;
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
@@ -703,9 +801,13 @@ struct X121SetupConditions
|
||||
string ichSummary = ichConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string mrbSummary = mrbConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string vlmSummary = vlmConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string slnSummary = slnConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string htdSummary = htdConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string atsSummary = atslConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string asctSummary = asctConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string sslcSummary = sslcConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string hullSummary = hullConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string dmntSummary = dmntConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
string adxtdSummary = adxtdConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||
|
||||
//
|
||||
@@ -718,12 +820,16 @@ struct X121SetupConditions
|
||||
ichSummary + separator +
|
||||
mrbSummary + separator +
|
||||
vlmSummary + separator +
|
||||
slnSummary + separator +
|
||||
strSummary + separator +
|
||||
cheSummary + separator +
|
||||
asctSummary + separator +
|
||||
sslcSummary + separator +
|
||||
hullSummary + separator +
|
||||
adxtdSummary + separator +
|
||||
htdSummary + separator +
|
||||
atsSummary + separator +
|
||||
dmntSummary + separator +
|
||||
""
|
||||
//
|
||||
;
|
||||
@@ -750,6 +856,115 @@ struct X121SetupConditions
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Add Combine Conditions ...
|
||||
|
||||
//
|
||||
bool IsTrendBullish()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
(strConditions.isTrendSwitchedToBullish &&
|
||||
slnConditions.isBullish &&
|
||||
htdConditions.isBullish &&
|
||||
atslConditions.isBullish &&
|
||||
cheConditions.isStrongBullish)
|
||||
//
|
||||
||
|
||||
//
|
||||
(slnConditions.isSwitchedToBullish &&
|
||||
strConditions.isTrendBullish &&
|
||||
htdConditions.isBullish &&
|
||||
atslConditions.isBullish &&
|
||||
cheConditions.isStrongBullish)
|
||||
//
|
||||
||
|
||||
//
|
||||
(htdConditions.isSwitchedToBullish &&
|
||||
strConditions.isTrendBullish &&
|
||||
slnConditions.isBullish &&
|
||||
atslConditions.isBullish &&
|
||||
cheConditions.isStrongBullish)
|
||||
//
|
||||
||
|
||||
//
|
||||
(atslConditions.isSwitchedToBullish &&
|
||||
strConditions.isTrendBullish &&
|
||||
htdConditions.isBullish &&
|
||||
slnConditions.isBullish &&
|
||||
cheConditions.isStrongBullish)
|
||||
//
|
||||
||
|
||||
//
|
||||
(cheConditions.isStrongSwitchedToBullish &&
|
||||
strConditions.isTrendBullish &&
|
||||
htdConditions.isBullish &&
|
||||
slnConditions.isBullish &&
|
||||
atslConditions.isBullish)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsTrendBearish()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
(strConditions.isTrendSwitchedToBearish &&
|
||||
slnConditions.isBearish &&
|
||||
htdConditions.isBearish &&
|
||||
atslConditions.isBearish &&
|
||||
cheConditions.isStrongBearish)
|
||||
//
|
||||
||
|
||||
//
|
||||
(slnConditions.isSwitchedToBearish &&
|
||||
strConditions.isTrendBearish &&
|
||||
htdConditions.isBearish &&
|
||||
atslConditions.isBearish &&
|
||||
cheConditions.isStrongBearish)
|
||||
//
|
||||
||
|
||||
//
|
||||
(htdConditions.isSwitchedToBearish &&
|
||||
strConditions.isTrendBearish &&
|
||||
slnConditions.isBearish &&
|
||||
atslConditions.isBearish &&
|
||||
cheConditions.isStrongBearish)
|
||||
//
|
||||
||
|
||||
//
|
||||
(atslConditions.isSwitchedToBearish &&
|
||||
strConditions.isTrendBearish &&
|
||||
htdConditions.isBearish &&
|
||||
slnConditions.isBearish &&
|
||||
cheConditions.isStrongBearish)
|
||||
//
|
||||
||
|
||||
//
|
||||
(cheConditions.isStrongSwitchedToBearish &&
|
||||
strConditions.isTrendBearish &&
|
||||
htdConditions.isBearish &&
|
||||
slnConditions.isBearish &&
|
||||
atslConditions.isBearish)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
string GetTag()
|
||||
{
|
||||
@@ -827,6 +1042,7 @@ struct X121SignalGenerator
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve OSC Based Short Verifications ...
|
||||
bool IsOSCShortVerified(
|
||||
@@ -1400,6 +1616,8 @@ struct X121SignalGenerator
|
||||
//
|
||||
// XPVF ...
|
||||
bool long18 =
|
||||
//
|
||||
false &&
|
||||
//
|
||||
// Starting Conditions ...
|
||||
conditions.pvConditions.isFiboIncreased &&
|
||||
@@ -1445,6 +1663,22 @@ struct X121SignalGenerator
|
||||
provider = ToString(PROVIDER_XPVSAR);
|
||||
}
|
||||
|
||||
//
|
||||
// XHTSRD ...
|
||||
bool long20 =
|
||||
//
|
||||
// Starting Conditions ...
|
||||
conditions.IsTrendBullish() &&
|
||||
conditions.dmntConditions.isBullish
|
||||
//
|
||||
;
|
||||
if (long20)
|
||||
{
|
||||
//
|
||||
pusher++;
|
||||
provider = ToString(PROVIDER_XHTSRD);
|
||||
}
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
@@ -1527,6 +1761,10 @@ struct X121SignalGenerator
|
||||
//
|
||||
long19
|
||||
//
|
||||
||
|
||||
//
|
||||
long20
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
@@ -2068,6 +2306,8 @@ struct X121SignalGenerator
|
||||
//
|
||||
// XPVF ...
|
||||
bool short18 =
|
||||
//
|
||||
false &&
|
||||
//
|
||||
// Starting Conditions ...
|
||||
conditions.pvConditions.isFiboDecreased &&
|
||||
@@ -2113,6 +2353,22 @@ struct X121SignalGenerator
|
||||
provider = ToString(PROVIDER_XPVSAR);
|
||||
}
|
||||
|
||||
//
|
||||
// XHTSRD ...
|
||||
bool short20 =
|
||||
//
|
||||
// Starting Conditions ...
|
||||
conditions.IsTrendBearish() &&
|
||||
conditions.dmntConditions.isBearish
|
||||
//
|
||||
;
|
||||
if (short20)
|
||||
{
|
||||
//
|
||||
pusher++;
|
||||
provider = ToString(PROVIDER_XHTSRD);
|
||||
}
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
@@ -2195,6 +2451,10 @@ struct X121SignalGenerator
|
||||
//
|
||||
short19
|
||||
//
|
||||
||
|
||||
//
|
||||
short20
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
@@ -3477,9 +3737,13 @@ public:
|
||||
XSCXMRBHelper *mrbHelper;
|
||||
XSCXOSCHelper *oscHelper;
|
||||
XSCXVLMHelper *vlmHelper;
|
||||
XSCXSLNHelper *slnHelper;
|
||||
XSCXHTDHelper *hdtHelper;
|
||||
XSCXASCTHelper *asctHelper;
|
||||
XSCXSSLCHelper *sslcHelper;
|
||||
XSCXHULLHelper *hullHelper;
|
||||
XSCXATSLHelper *atslHelper;
|
||||
XSCXDMNTHelper *dmntHelper;
|
||||
XSCXADXTDHelper *adxtdHelper;
|
||||
|
||||
//
|
||||
@@ -3501,9 +3765,12 @@ public:
|
||||
delete mrbHelper;
|
||||
delete oscHelper;
|
||||
delete vlmHelper;
|
||||
delete hdtHelper;
|
||||
delete asctHelper;
|
||||
delete sslcHelper;
|
||||
delete hullHelper;
|
||||
delete atslHelper;
|
||||
delete dmntHelper;
|
||||
delete adxtdHelper;
|
||||
}
|
||||
|
||||
@@ -3559,6 +3826,19 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XSLN ...
|
||||
slnHelper = new XSCXSLNHelper();
|
||||
result = slnHelper.Init(
|
||||
inputs.symbol,
|
||||
inputs.period,
|
||||
inputs.slnInputs //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XTD ...
|
||||
tdHelper = new XSCXTDHelper();
|
||||
@@ -3572,6 +3852,45 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XHTD ...
|
||||
hdtHelper = new XSCXHTDHelper();
|
||||
result = hdtHelper.Init(
|
||||
inputs.symbol,
|
||||
inputs.period,
|
||||
inputs.htdInputs //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XATSL ...
|
||||
atslHelper = new XSCXATSLHelper();
|
||||
result = atslHelper.Init(
|
||||
inputs.symbol,
|
||||
inputs.period,
|
||||
inputs.atslInputs //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XDMNT ...
|
||||
dmntHelper = new XSCXDMNTHelper();
|
||||
result = dmntHelper.Init(
|
||||
inputs.symbol,
|
||||
inputs.period,
|
||||
inputs.dmntInputs //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XHK ...
|
||||
hkHelper = new XSCXHKHelper();
|
||||
@@ -3764,6 +4083,50 @@ public:
|
||||
conditions.period = GetPeriod();
|
||||
conditions.time = TimeCurrent();
|
||||
|
||||
//
|
||||
result = hdtHelper.GetConditions(
|
||||
conditions.htdConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = slnHelper.GetConditions(
|
||||
conditions.slnConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = atslHelper.GetConditions(
|
||||
conditions.atslConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = dmntHelper.GetConditions(
|
||||
conditions.dmntConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = pvHelper.GetConditions(
|
||||
conditions.pvConditions,
|
||||
|
||||
Reference in New Issue
Block a user