Skip to content

Commit

Permalink
1.07
Browse files Browse the repository at this point in the history
Fixed a critical bug in the hidden equity trailing stop (it failed to close positions when hit).
  • Loading branch information
EarnForex committed Feb 16, 2022
1 parent db77df9 commit a5646df
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MQL4/Experts/Account Protector/Account Protector.mq4
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
//+------------------------------------------------------------------+
#property copyright "EarnForex.com"
#property link "https://www.earnforex.com/metatrader-expert-advisors/Account-Protector/"
#property version "1.06"
string Version = "1.06";
#property version "1.07"
string Version = "1.07";
#property strict

#property description "Protects account balance by applying given actions when set conditions trigger."
Expand Down
1 change: 1 addition & 0 deletions MQL4/Experts/Account Protector/Account Protector.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -4088,6 +4088,7 @@ void CAccountProtector::EquityTrailing()
string AdditionalFunds_Asterisk = "";
if (AdditionalFunds != 0) AdditionalFunds_Asterisk = "*";
Logging("Account Protector: Equity stop-loss of " + DoubleToString(sets.doubleCurrentEquityStopLoss, 2) + " hit at " + DoubleToString(AE, 2) + AdditionalFunds_Asterisk + ". Closing all positions.");
Logging_Condition_Is_Met();
Close_All_Positions();

sets.boolEquityTrailingStop = false;
Expand Down
Binary file modified MQL5/Experts/Account Protector/Account Protector.mq5
Binary file not shown.
Binary file modified MQL5/Experts/Account Protector/Account Protector.mqh
Binary file not shown.

0 comments on commit a5646df

Please sign in to comment.