fix some issues ...
This commit is contained in:
@@ -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 ...";
|
||||
|
||||
Reference in New Issue
Block a user