fix some issues ...

This commit is contained in:
2024-06-22 08:44:07 +03:30
parent 6063d3be61
commit 154ebda012
+7 -7
View File
@@ -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 ...";