add supports for XASCT in mCycle ...
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "../Helpers/x-saherelm.xche.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xosc.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xama.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xasct.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xhull.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xsslc.helper.mq5"
|
||||
|
||||
@@ -101,6 +102,7 @@ public:
|
||||
XSTRInputs strInputs;
|
||||
XDONInputs donInputs;
|
||||
XOSCInputs oscInputs;
|
||||
XASCTInputs asctInputs;
|
||||
XHULLInputs hullInputs;
|
||||
XSSLCInputs sslcInputs;
|
||||
|
||||
@@ -183,6 +185,10 @@ public:
|
||||
{
|
||||
hullInputs.Default();
|
||||
}
|
||||
if (!asctInputs.IsValid())
|
||||
{
|
||||
asctInputs.Default();
|
||||
}
|
||||
if (!sslcInputs.IsValid())
|
||||
{
|
||||
sslcInputs.Default();
|
||||
@@ -208,6 +214,7 @@ public:
|
||||
cMarketInputs.cheInputs = this.cheInputs;
|
||||
cMarketInputs.ichInputs = this.ichInputs;
|
||||
cMarketInputs.donInputs = this.donInputs;
|
||||
cMarketInputs.asctInputs = this.asctInputs;
|
||||
cMarketInputs.hullInputs = this.hullInputs;
|
||||
cMarketInputs.sslcInputs = this.sslcInputs;
|
||||
result = cMarketInputs.Init(
|
||||
@@ -237,6 +244,7 @@ public:
|
||||
sMarketInputs.cheInputs = this.cheInputs;
|
||||
sMarketInputs.ichInputs = this.ichInputs;
|
||||
sMarketInputs.donInputs = this.donInputs;
|
||||
sMarketInputs.asctInputs = this.asctInputs;
|
||||
sMarketInputs.hullInputs = this.hullInputs;
|
||||
sMarketInputs.sslcInputs = this.sslcInputs;
|
||||
result = sMarketInputs.Init(
|
||||
@@ -266,6 +274,7 @@ public:
|
||||
mMarketInputs.cheInputs = this.cheInputs;
|
||||
mMarketInputs.ichInputs = this.ichInputs;
|
||||
mMarketInputs.donInputs = this.donInputs;
|
||||
mMarketInputs.asctInputs = this.asctInputs;
|
||||
mMarketInputs.hullInputs = this.hullInputs;
|
||||
mMarketInputs.sslcInputs = this.sslcInputs;
|
||||
result = mMarketInputs.Init(
|
||||
@@ -295,6 +304,7 @@ public:
|
||||
lMarketInputs.cheInputs = this.cheInputs;
|
||||
lMarketInputs.ichInputs = this.ichInputs;
|
||||
lMarketInputs.donInputs = this.donInputs;
|
||||
lMarketInputs.asctInputs = this.asctInputs;
|
||||
lMarketInputs.hullInputs = this.hullInputs;
|
||||
lMarketInputs.sslcInputs = this.sslcInputs;
|
||||
result = lMarketInputs.Init(
|
||||
@@ -324,6 +334,7 @@ public:
|
||||
hMarketInputs.cheInputs = this.cheInputs;
|
||||
hMarketInputs.ichInputs = this.ichInputs;
|
||||
hMarketInputs.donInputs = this.donInputs;
|
||||
hMarketInputs.asctInputs = this.asctInputs;
|
||||
hMarketInputs.hullInputs = this.hullInputs;
|
||||
hMarketInputs.sslcInputs = this.sslcInputs;
|
||||
result = hMarketInputs.Init(
|
||||
@@ -378,6 +389,7 @@ public:
|
||||
donInputs.IsValid() &&
|
||||
oscInputs.IsValid() &&
|
||||
ichInputs.IsValid() &&
|
||||
asctInputs.IsValid() &&
|
||||
hullInputs.IsValid() &&
|
||||
sslcInputs.IsValid() &&
|
||||
//
|
||||
@@ -435,6 +447,7 @@ public:
|
||||
donInputs.Clean();
|
||||
oscInputs.Clean();
|
||||
ichInputs.Clean();
|
||||
asctInputs.Clean();
|
||||
hullInputs.Clean();
|
||||
sslcInputs.Clean();
|
||||
//
|
||||
@@ -487,6 +500,7 @@ public:
|
||||
donInputs.Default();
|
||||
oscInputs.Default();
|
||||
ichInputs.Default();
|
||||
asctInputs.Default();
|
||||
hullInputs.Default();
|
||||
sslcInputs.Default();
|
||||
|
||||
@@ -522,6 +536,7 @@ public:
|
||||
result = MathMax(result, donInputs.Max());
|
||||
result = MathMax(result, oscInputs.Max());
|
||||
result = MathMax(result, ichInputs.Max());
|
||||
result = MathMax(result, asctInputs.Max());
|
||||
result = MathMax(result, hullInputs.Max());
|
||||
result = MathMax(result, sslcInputs.Max());
|
||||
|
||||
@@ -1444,7 +1459,7 @@ struct X121ProviderDescriptor
|
||||
//
|
||||
for (int i = 0; i < signallersCount; i++)
|
||||
{
|
||||
//
|
||||
//
|
||||
// Check all Markets for Long Conditions ...
|
||||
|
||||
//
|
||||
@@ -1665,21 +1680,21 @@ struct X121ProviderDescriptor
|
||||
//
|
||||
cHasLong
|
||||
//
|
||||
||
|
||||
//
|
||||
sHasLong
|
||||
//
|
||||
||
|
||||
//
|
||||
mHasLong
|
||||
//
|
||||
||
|
||||
//
|
||||
lHasLong
|
||||
//
|
||||
||
|
||||
//
|
||||
hHasLong
|
||||
// ||
|
||||
// //
|
||||
// sHasLong
|
||||
// //
|
||||
// ||
|
||||
// //
|
||||
// mHasLong
|
||||
// //
|
||||
// ||
|
||||
// //
|
||||
// lHasLong
|
||||
// //
|
||||
// ||
|
||||
// //
|
||||
// hHasLong
|
||||
//
|
||||
;
|
||||
|
||||
@@ -1688,21 +1703,21 @@ struct X121ProviderDescriptor
|
||||
//
|
||||
cHasShort
|
||||
//
|
||||
||
|
||||
//
|
||||
sHasShort
|
||||
//
|
||||
||
|
||||
//
|
||||
mHasShort
|
||||
//
|
||||
||
|
||||
//
|
||||
lHasShort
|
||||
//
|
||||
||
|
||||
//
|
||||
hHasShort
|
||||
// ||
|
||||
// //
|
||||
// sHasShort
|
||||
// //
|
||||
// ||
|
||||
// //
|
||||
// mHasShort
|
||||
// //
|
||||
// ||
|
||||
// //
|
||||
// lHasShort
|
||||
// //
|
||||
// ||
|
||||
// //
|
||||
// hHasShort
|
||||
//
|
||||
;
|
||||
|
||||
@@ -1720,10 +1735,10 @@ struct X121ProviderDescriptor
|
||||
//
|
||||
bool hasSignal =
|
||||
//
|
||||
isScorePassed &&
|
||||
// isScorePassed &&
|
||||
(hasLong
|
||||
? longVerifiers > 1
|
||||
: shortVerifiers > 1)
|
||||
? longVerifiers >= 1
|
||||
: shortVerifiers >= 1)
|
||||
//
|
||||
;
|
||||
if (!hasSignal)
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "../Helpers/x-saherelm.xosc.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xstr.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xich.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xasct.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xhull.helper.mq5"
|
||||
#include "../Helpers/x-saherelm.xsslc.helper.mq5"
|
||||
|
||||
@@ -178,6 +179,7 @@ public:
|
||||
XCHEInputs cheInputs; // CHE Inputs ...
|
||||
XICHInputs ichInputs; // ICH Inputs ...
|
||||
XDONInputs donInputs; // DON Inputs ...
|
||||
XASCTInputs asctInputs; // ASCT Inputs ...
|
||||
XHULLInputs hullInputs; // HULL Inputs ...
|
||||
XSSLCInputs sslcInputs; // SSLC Inputs ...
|
||||
|
||||
@@ -266,6 +268,7 @@ public:
|
||||
XCHEInputs &mCheInputs, // CHE Inputs
|
||||
XICHInputs &mIchInputs, // ICH Inputs ...
|
||||
XDONInputs &mDonInputs, // DON Inputs ...
|
||||
XASCTInputs &mAsctInputs, // ASCT Inputs
|
||||
XHULLInputs &mHullInputs, // HULL Inputs ...
|
||||
XSSLCInputs &mSslcInputs, // SSLC Inputs ...
|
||||
int mHostBarIndex = 0, // Specified Host Period Bar Index
|
||||
@@ -301,6 +304,7 @@ public:
|
||||
cheInputs = mCheInputs;
|
||||
ichInputs = mIchInputs;
|
||||
donInputs = mDonInputs;
|
||||
asctInputs = mAsctInputs;
|
||||
hullInputs = mHullInputs;
|
||||
sslcInputs = mSslcInputs;
|
||||
|
||||
@@ -334,6 +338,7 @@ public:
|
||||
cheInputs.Clean();
|
||||
ichInputs.Clean();
|
||||
donInputs.Clean();
|
||||
asctInputs.Clean();
|
||||
hullInputs.Clean();
|
||||
sslcInputs.Clean();
|
||||
|
||||
@@ -367,6 +372,7 @@ public:
|
||||
cheInputs.Default();
|
||||
ichInputs.Default();
|
||||
donInputs.Default();
|
||||
asctInputs.Default();
|
||||
hullInputs.Default();
|
||||
sslcInputs.Default();
|
||||
|
||||
@@ -476,6 +482,13 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = asctInputs.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = sslcInputs.IsValid();
|
||||
if (!result)
|
||||
@@ -509,6 +522,7 @@ public:
|
||||
result = MathMax(result, cheInputs.Max());
|
||||
result = MathMax(result, ichInputs.Max());
|
||||
result = MathMax(result, donInputs.Max());
|
||||
result = MathMax(result, asctInputs.Max());
|
||||
result = MathMax(result, hullInputs.Max());
|
||||
result = MathMax(result, sslcInputs.Max());
|
||||
|
||||
@@ -558,6 +572,11 @@ public:
|
||||
XOHCL hkBars[];
|
||||
XOHCL smHKBars[];
|
||||
|
||||
//
|
||||
// XASCT ...
|
||||
double asctLongs[];
|
||||
double asctShorts[];
|
||||
|
||||
//
|
||||
// XICH ...
|
||||
double ichTenkanSens[];
|
||||
@@ -685,6 +704,11 @@ public:
|
||||
bool isZigZagInPeak;
|
||||
bool isZigZagInVale;
|
||||
|
||||
//
|
||||
// XASCT ...
|
||||
bool isASCTLong;
|
||||
bool isASCTShort;
|
||||
|
||||
//
|
||||
// XHULL ...
|
||||
bool isHullBullish;
|
||||
@@ -967,6 +991,8 @@ public:
|
||||
//
|
||||
// Buffers ...
|
||||
Clean(bars);
|
||||
Clean(asctLongs);
|
||||
Clean(asctShorts);
|
||||
Clean(hkBars);
|
||||
Clean(smHKBars);
|
||||
Clean(ichTenkanSens);
|
||||
@@ -1053,6 +1079,8 @@ public:
|
||||
// Buffers ...
|
||||
ArraySetAsSeries(bars, true);
|
||||
ArraySetAsSeries(hkBars, true);
|
||||
ArraySetAsSeries(asctLongs, true);
|
||||
ArraySetAsSeries(asctShorts, true);
|
||||
ArraySetAsSeries(smHKBars, true);
|
||||
ArraySetAsSeries(ichTenkanSens, true);
|
||||
ArraySetAsSeries(ichKijunSens, true);
|
||||
@@ -1139,6 +1167,11 @@ public:
|
||||
isZigZagInPeak = false;
|
||||
isZigZagInVale = false;
|
||||
|
||||
//
|
||||
// XASCT ...
|
||||
isASCTLong = false;
|
||||
isASCTShort = false;
|
||||
|
||||
//
|
||||
// XHULL ...
|
||||
isHullBullish = false;
|
||||
@@ -1388,6 +1421,23 @@ public:
|
||||
multiplier = 1;
|
||||
}
|
||||
|
||||
//
|
||||
// XASCT ...
|
||||
if (isASCTLong)
|
||||
{
|
||||
//
|
||||
bullScore++;
|
||||
bullScore++;
|
||||
bearScore--;
|
||||
}
|
||||
if (isASCTShort)
|
||||
{
|
||||
//
|
||||
bullScore--;
|
||||
bearScore++;
|
||||
bearScore++;
|
||||
}
|
||||
|
||||
//
|
||||
// Candlestic ...
|
||||
if (isLastBullish)
|
||||
@@ -2222,6 +2272,18 @@ public:
|
||||
;
|
||||
candlestickStr = SetLabel("XOHCL: ", candlestickStr, separator);
|
||||
|
||||
//
|
||||
// XASCT ...
|
||||
string asctStr =
|
||||
//
|
||||
ToString("isASCTLong", isASCTLong, ignoreFalseConditions, separator) +
|
||||
ToString("isASCTShort", isASCTShort, ignoreFalseConditions, separator) +
|
||||
|
||||
""
|
||||
//
|
||||
;
|
||||
asctStr = SetLabel("XASCT: ", asctStr, separator);
|
||||
|
||||
//
|
||||
// XZG ...
|
||||
string zgStr =
|
||||
@@ -2489,6 +2551,7 @@ public:
|
||||
? commonStr
|
||||
: (commonStr +
|
||||
candlestickStr +
|
||||
asctStr +
|
||||
zgStr +
|
||||
strStr +
|
||||
cheStr +
|
||||
@@ -2821,11 +2884,11 @@ public:
|
||||
//
|
||||
// Check Has Conditions opr Not ...
|
||||
bool HasConditions(
|
||||
const X121MCycleConditions &conditions, // Market Conditions
|
||||
bool &hasLong, // Hold Long Conditions Result
|
||||
bool &hasShort, // Hold Short Conditions Result
|
||||
double &sl, // Hold SL ...
|
||||
double &tp // Hold TP ...
|
||||
X121MCycleConditions &conditions, // Market Conditions
|
||||
bool &hasLong, // Hold Long Conditions Result
|
||||
bool &hasShort, // Hold Short Conditions Result
|
||||
double &sl, // Hold SL ...
|
||||
double &tp // Hold TP ...
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -2845,9 +2908,9 @@ public:
|
||||
//
|
||||
// Check Has Long Conditions opr Not ...
|
||||
virtual bool HasLongConditions(
|
||||
const X121MCycleConditions &conditions, // Market Conditions
|
||||
double &sl, // Hold SL ...
|
||||
double &tp // Hold TP ...
|
||||
X121MCycleConditions &conditions, // Market Conditions
|
||||
double &sl, // Hold SL ...
|
||||
double &tp // Hold TP ...
|
||||
)
|
||||
{
|
||||
return false;
|
||||
@@ -2856,9 +2919,9 @@ public:
|
||||
//
|
||||
// Check Has Short Conditions opr Not ...
|
||||
virtual bool HasShortConditions(
|
||||
const X121MCycleConditions &conditions, // Market Conditions
|
||||
double &sl, // Hold SL ...
|
||||
double &tp // Hold TP ...
|
||||
X121MCycleConditions &conditions, // Market Conditions
|
||||
double &sl, // Hold SL ...
|
||||
double &tp // Hold TP ...
|
||||
)
|
||||
{
|
||||
return false;
|
||||
@@ -2896,6 +2959,7 @@ public:
|
||||
XSCXOSCHelper osc;
|
||||
XSCXICHHelper ich;
|
||||
XSCXDONHelper don;
|
||||
XSCXASCTHelper asct;
|
||||
XSCXHULLHelper hull;
|
||||
XSCXSSLCHelper sslc;
|
||||
|
||||
@@ -3059,6 +3123,23 @@ public:
|
||||
//
|
||||
// Filling Buffers ...
|
||||
|
||||
//
|
||||
// XASCT ...
|
||||
|
||||
//
|
||||
asct.CopyLong(
|
||||
start,
|
||||
count,
|
||||
conditions.asctLongs //
|
||||
);
|
||||
|
||||
//
|
||||
asct.CopyShort(
|
||||
start,
|
||||
count,
|
||||
conditions.asctShorts //
|
||||
);
|
||||
|
||||
//
|
||||
// XHULL ...
|
||||
|
||||
@@ -3811,6 +3892,13 @@ public:
|
||||
bool isSMHKSwitchedToBullish = cSMHKBar.IsBullish() && !pSMHKBar.IsBullish();
|
||||
bool isSMHKSwitchedToBearish = cSMHKBar.IsBearish() && !pSMHKBar.IsBearish();
|
||||
|
||||
//
|
||||
// XASCT ...
|
||||
|
||||
//
|
||||
bool isASCTLong = conditions.asctLongs[zIndex] > 0;
|
||||
bool isASCTShort = conditions.asctShorts[zIndex] > 0;
|
||||
|
||||
//
|
||||
// XSSLC ...
|
||||
|
||||
@@ -4486,6 +4574,10 @@ public:
|
||||
conditions.isCurrentMidLineOverLastMidLine = isCurrentMidLineOverLastMidLine;
|
||||
conditions.isCurrentMidLineUnderLastMidLine = isCurrentMidLineUnderLastMidLine;
|
||||
|
||||
//
|
||||
conditions.isASCTLong = isASCTLong;
|
||||
conditions.isASCTShort = isASCTShort;
|
||||
|
||||
//
|
||||
conditions.isSSLCBullish = isSSLCBullish;
|
||||
conditions.isSSLCBearish = isSSLCBearish;
|
||||
@@ -4719,6 +4811,19 @@ public:
|
||||
//
|
||||
// Init Helpers ...
|
||||
|
||||
//
|
||||
// XASCT ...
|
||||
result = asct.Init(
|
||||
symbol,
|
||||
period,
|
||||
mInputs.asctInputs
|
||||
//
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XHULL ...
|
||||
result = hull.Init(
|
||||
|
||||
Reference in New Issue
Block a user