From 8cd537d03940cb0ece942d26886f28862ddb559a Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Tue, 23 Jul 2024 17:24:19 +0330 Subject: [PATCH] last ... --- Experts/x-test-strategies.ea.mq5 | 52 ++++++++++++------------- Strategies/x-saherelm.xdtd.strategy.mq5 | 7 ++++ 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/Experts/x-test-strategies.ea.mq5 b/Experts/x-test-strategies.ea.mq5 index 5fb61746..c291ec8a 100644 --- a/Experts/x-test-strategies.ea.mq5 +++ b/Experts/x-test-strategies.ea.mq5 @@ -274,7 +274,7 @@ bool InitialEA() // bool useXTest = false; - bool useXDTD = false; + bool useXDTD = true; // // EURUSD ... @@ -304,7 +304,7 @@ bool InitialEA() eaTPPoint, // TP eaSLPoint, // SL eaIgnoreTP, - eaIgnoreSL, + false, // eaIgnoreSL, eaAllowLong, eaAllowShort, eaMaxAllowedLongs, // Max Longs @@ -349,30 +349,30 @@ bool InitialEA() } // - XSCXDTDStrategy *xTDTStrategy; - xTDTStrategy = new XSCXDTDStrategy( - _Symbol, - _Period, - eaVolume, - eaR2R, // R2R ... - eaSlippage, - eaMagicNumber, - true, // Ignore Signal Execution - true, // Use TP SL Point - false, // Use Max - eaTPPoint, // TP - eaSLPoint, // SL - eaIgnoreTP, - eaIgnoreSL, - eaAllowLong, - eaAllowShort, - eaMaxAllowedLongs, // Max Longs - eaMaxAllowedShorts // Max Shorts - ); - xTDTStrategy.SetAlertLogAlerts(true); - xTDTStrategy.SetAlertEnableAlerts(true); - xTDTStrategy.AddSignalEventHandler(OnSignalRecieved); - RegisterStrategy(xTDTStrategy); + // XSCXDTDStrategy *xTDTStrategy; + // xTDTStrategy = new XSCXDTDStrategy( + // _Symbol, + // _Period, + // eaVolume, + // eaR2R, // R2R ... + // eaSlippage, + // eaMagicNumber, + // true, // Ignore Signal Execution + // true, // Use TP SL Point + // false, // Use Max + // eaTPPoint, // TP + // eaSLPoint, // SL + // eaIgnoreTP, + // eaIgnoreSL, + // eaAllowLong, + // eaAllowShort, + // eaMaxAllowedLongs, // Max Longs + // eaMaxAllowedShorts // Max Shorts + // ); + // xTDTStrategy.SetAlertLogAlerts(true); + // xTDTStrategy.SetAlertEnableAlerts(true); + // xTDTStrategy.AddSignalEventHandler(OnSignalRecieved); + // RegisterStrategy(xTDTStrategy); // return result; diff --git a/Strategies/x-saherelm.xdtd.strategy.mq5 b/Strategies/x-saherelm.xdtd.strategy.mq5 index e3793a4b..2d21e13a 100644 --- a/Strategies/x-saherelm.xdtd.strategy.mq5 +++ b/Strategies/x-saherelm.xdtd.strategy.mq5 @@ -564,6 +564,13 @@ public: tp // ); + // + if (result) { + // + upperTouchTime = NULL; + lowerTouchTime = NULL; + } + // return result; }