From 834090a2be2e11f91b610644bc121bbd62bcec28 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Wed, 12 Jun 2024 11:57:37 +0330 Subject: [PATCH] apply some change to categorized Signal Results Based on Profits or Loss ... --- Classes/x-saherelm.x121.setup.class.mq5 | 60 +++++++++++++++++++++++++ Classes/x-saherelm.x121.setup.xea.mq5 | 4 ++ Experts/x-saherelm.x121.ea.mq5 | 2 +- 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/Classes/x-saherelm.x121.setup.class.mq5 b/Classes/x-saherelm.x121.setup.class.mq5 index 376ec82c..0e5129e9 100644 --- a/Classes/x-saherelm.x121.setup.class.mq5 +++ b/Classes/x-saherelm.x121.setup.class.mq5 @@ -1868,6 +1868,44 @@ struct X121SignalGenerator return result; } + // + // Filter Long Conditions ... + bool FilterLongConditions( + X121SetupConditions &conditions, // Conditions + int pusher, // Pushers + string provider // Provider + ) + { + // + bool result = false; + + // + // TODO Filter ... + result = true; + + // + return result; + } + + // + // Filter Short Conditions ... + bool FilterShortConditions( + X121SetupConditions &conditions, // Conditions + int pusher, // Pushers + string provider // Provider + ) + { + // + bool result = false; + + // + // TODO Filter ... + result = true; + + // + return result; + } + // // Check Conditions for Generating Possible Signals ... bool HasSignal( @@ -1911,6 +1949,17 @@ struct X121SignalGenerator pusher, provider // ); + + // + if (hasLong) + { + // + hasLong = FilterLongConditions( + conditions, + pusher, + provider // + ); + } } // @@ -1923,6 +1972,17 @@ struct X121SignalGenerator pusher, provider // ); + + // + if (hasShort) + { + // + hasShort = FilterShortConditions( + conditions, + pusher, + provider // + ); + } } // diff --git a/Classes/x-saherelm.x121.setup.xea.mq5 b/Classes/x-saherelm.x121.setup.xea.mq5 index 8a289ef7..c9c85405 100644 --- a/Classes/x-saherelm.x121.setup.xea.mq5 +++ b/Classes/x-saherelm.x121.setup.xea.mq5 @@ -255,6 +255,10 @@ struct XSignalInfo // symbol + "\\" + ToString(signal.type) + "\\" + + (profit >= 0 + ? "Profit" + : "Loss") + + "\\" + provider + "_" + ToString(ticket) + "_" + ToString(period) + "_" + diff --git a/Experts/x-saherelm.x121.ea.mq5 b/Experts/x-saherelm.x121.ea.mq5 index 0f0f0210..94ff0098 100644 --- a/Experts/x-saherelm.x121.ea.mq5 +++ b/Experts/x-saherelm.x121.ea.mq5 @@ -43,7 +43,7 @@ string x121EASymbols = "EURUSDb"; // Symbols // Signals ... bool x121EAAllowLong = true; // Allow Long Trades bool x121EAAllowShort = true; // Allow Short Trades -int x121EAReuiredSignalVerifications = 4; // Required Verifications for Signals +int x121EAReuiredSignalVerifications = 3; // Required Verifications for Signals // // Risk Management ...