From c46578a846f8f329c1bd150695b9e8fdf4ddad37 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Tue, 8 Oct 2024 23:24:56 +0330 Subject: [PATCH] Fix Protecting Mechanism on GUI ... --- Experts/x-saherelm.x121.ea.mq5 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Experts/x-saherelm.x121.ea.mq5 b/Experts/x-saherelm.x121.ea.mq5 index 84a87c8b..776df9da 100644 --- a/Experts/x-saherelm.x121.ea.mq5 +++ b/Experts/x-saherelm.x121.ea.mq5 @@ -216,9 +216,9 @@ XCButton eaHedgingBtn; XCButton eaTraillingBtn; XCButton eaProtectingBtn; XCButton eaUseForceMomentumProtectingBtn; -bool eaEnableHedging = false; -bool eaEnableTrailling = false; -bool eaEnableProtecting = false; +bool eaEnableHedging = eaAllowHedge; +bool eaEnableTrailling = eaAllowTrail; +bool eaEnableProtecting = eaAllowProtect; bool eaUseForceMomentumProtecting = eaUseForceMomentumsInProtection; // @@ -1653,7 +1653,7 @@ void UpdateProtectorGUI() // // Check Hedging State ... - bool isHedgingActived = eaAllowHedge && + bool isHedgingActived = eaEnableHedging && isHedgingActiveProps; eaEnableHedging = isHedgingActived; @@ -1686,7 +1686,7 @@ void UpdateProtectorGUI() // // Check Trailling State ... bool isTraillingActived = - eaAllowTrail && + eaEnableTrailling && isTraillingActiveProps; eaEnableTrailling = isTraillingActived; @@ -1719,7 +1719,7 @@ void UpdateProtectorGUI() // // Check Protection State ... bool isProtectingActived = - eaAllowProtect && + eaEnableProtecting && isProtectingActiveProps; eaEnableProtecting = isProtectingActived;