diff --git a/Classes/x-saherelm.x121.x121.provider.class.mq5 b/Classes/x-saherelm.x121.x121.provider.class.mq5 index 9ebb7b6a..e6f792f2 100644 --- a/Classes/x-saherelm.x121.x121.provider.class.mq5 +++ b/Classes/x-saherelm.x121.x121.provider.class.mq5 @@ -42,6 +42,7 @@ public: void X121Signaller() { name = X121; + Default(); } // @@ -61,6 +62,48 @@ public: // bool result = false; + // + sl = 0; + tp = 0; + + // + result = enableLong; + if (!result) + { + return result; + } + + // + result = + // + (conditions.isMRBFastCrossedOverSlow && + (conditions.isCHEBullish && + conditions.isTrendBullish && + conditions.isMCFastOverSlow)) + // + || + // + (conditions.isMRBSlowCrossedtOverVerifier && + (conditions.isCHEBullish && + conditions.isTrendBullish && + conditions.isMCFastOverSlow && + conditions.isMRBFastOverSlow)) + // + || + // + (conditions.isCHESwitchedToBullish && + (conditions.isTrendBullish && + conditions.isMCFastOverSlow && + conditions.isMRBFastOverSlow)) + // + ; + + // + if (result) + { + sl = conditions.mrbSlows[1]; + } + // return result; } @@ -75,6 +118,54 @@ public: // bool result = false; + // + sl = 0; + tp = 0; + + // + result = enableShort; + if (!result) + { + return result; + } + + // + result = + // + (conditions.isSMHKSwitchedToBearish && + (conditions.isTDBearish && + conditions.isCHEBearish && + conditions.isTrendBearish)) + // + || + // + (conditions.isTDSwitchedToBearish && + (conditions.isSMHKBearish && + conditions.isCHEBearish && + conditions.isTrendBearish)) + // + || + // + (conditions.isCHESwitchedToBearish && + (conditions.isTDBearish && + conditions.isSMHKBearish && + conditions.isTrendBearish)) + // + || + // + (conditions.isTrendSwitchedToBearish && + (conditions.isTDBearish && + conditions.isCHEBearish && + conditions.isSMHKBearish)) + // + ; + + // + if (result) + { + sl = conditions.mrbFasts[1]; + } + // return result; } diff --git a/Experts/x-test.x121ea.mq5 b/Experts/x-test.x121ea.mq5 index 4aa88ea6..53b3cf5c 100644 --- a/Experts/x-test.x121ea.mq5 +++ b/Experts/x-test.x121ea.mq5 @@ -24,6 +24,7 @@ // #include "../Classes/x-saherelm.x121.xea.class.mq5" +#include "../Classes/x-saherelm.x121.x121.provider.class.mq5" #include "../Classes/x-saherelm.x121.x786.provider.class.mq5" // @@ -233,20 +234,21 @@ bool InitialEA() Clean(iDescriptor.signallers); // - ArrayResize(iDescriptor.signallers, 1); + ArrayResize(iDescriptor.signallers, 2); // + // X786 Signaller ... X786Signaller *x786Signaller = new X786Signaller(); x786Signaller.Default(); // - iDescriptor.signallers[0] = x786Signaller; + // X121 Signaller ... + X121Signaller *x121Signaller = new X121Signaller(); + x121Signaller.Default(); - // int signallersCount = ArraySize(signallers); - // for (int j = 0; j < signallersCount; j++) - // { - // iDescriptor.signallers[j] = signallers[j]; - // } + // + iDescriptor.signallers[0] = x786Signaller; + iDescriptor.signallers[1] = x121Signaller; // // Set Inputs to Default ...