diff --git a/Classes/x-saherelm.x121.setup.xea.mq5 b/Classes/x-saherelm.x121.setup.xea.mq5 index c9067778..735bf18b 100644 --- a/Classes/x-saherelm.x121.setup.xea.mq5 +++ b/Classes/x-saherelm.x121.setup.xea.mq5 @@ -4896,7 +4896,7 @@ private: } // - double profits = SpecifiedCalculatePositionsProfit(positionsCount); + double profits = SpecifiedCalculatePositionsProfit(positions); // // Checking Force Sate Conditions ... @@ -4937,7 +4937,7 @@ private: // // Close Max In Drawdown Position ... int maxInDIDX = FindMaxDrawdownIndex(positions); - if (isValidIndex(maxInDIDX)) + if (IsValidIndex(maxInDIDX)) { // string comment = XEQMSupportToken + " Max In D ..."; @@ -4972,13 +4972,13 @@ private: // double requiredProfit = SpecifiedCalculateRequiredProfitForHedge( positions, - mMinRequiredProfitPerTrade, - mMinRequiredProfitPerVolumeFactor // + MinRequiredProfitPerTrade(), + MinRequiredProfitPerVolumeFactor() // ); // double halfProfit = requiredProfit / 2; - if (halfProfit > 0 && profit > halfProfit) + if (halfProfit > 0 && profits > halfProfit) { // bool isHedged = DoEQMForceClose(halfProfit); @@ -5006,7 +5006,7 @@ private: if (isClosed) { // - string message = XEQMSupportToken + "Close " + ToString(positions[maxInDIDX].ticket) + " Due Min In Profit ..."; + string message = XEQMSupportToken + "Close " + ToString(positions[minInPIDX].ticket) + " Due Min In Profit ..."; // Alert(message); @@ -5019,7 +5019,7 @@ private: // // Close Max In Drawdown Position ... int maxInDIDX = FindMaxDrawdownIndex(positions); - if (isValidIndex(maxInDIDX)) + if (IsValidIndex(maxInDIDX)) { // string comment = XEQMSupportToken + " Max In D ...";