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 ...
|
// Checking Force Sate Conditions ...
|
||||||
@@ -4937,7 +4937,7 @@ private:
|
|||||||
//
|
//
|
||||||
// Close Max In Drawdown Position ...
|
// Close Max In Drawdown Position ...
|
||||||
int maxInDIDX = FindMaxDrawdownIndex(positions);
|
int maxInDIDX = FindMaxDrawdownIndex(positions);
|
||||||
if (isValidIndex(maxInDIDX))
|
if (IsValidIndex(maxInDIDX))
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
string comment = XEQMSupportToken + " Max In D ...";
|
string comment = XEQMSupportToken + " Max In D ...";
|
||||||
@@ -4972,13 +4972,13 @@ private:
|
|||||||
//
|
//
|
||||||
double requiredProfit = SpecifiedCalculateRequiredProfitForHedge(
|
double requiredProfit = SpecifiedCalculateRequiredProfitForHedge(
|
||||||
positions,
|
positions,
|
||||||
mMinRequiredProfitPerTrade,
|
MinRequiredProfitPerTrade(),
|
||||||
mMinRequiredProfitPerVolumeFactor //
|
MinRequiredProfitPerVolumeFactor() //
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
double halfProfit = requiredProfit / 2;
|
double halfProfit = requiredProfit / 2;
|
||||||
if (halfProfit > 0 && profit > halfProfit)
|
if (halfProfit > 0 && profits > halfProfit)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
bool isHedged = DoEQMForceClose(halfProfit);
|
bool isHedged = DoEQMForceClose(halfProfit);
|
||||||
@@ -5006,7 +5006,7 @@ private:
|
|||||||
if (isClosed)
|
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);
|
Alert(message);
|
||||||
@@ -5019,7 +5019,7 @@ private:
|
|||||||
//
|
//
|
||||||
// Close Max In Drawdown Position ...
|
// Close Max In Drawdown Position ...
|
||||||
int maxInDIDX = FindMaxDrawdownIndex(positions);
|
int maxInDIDX = FindMaxDrawdownIndex(positions);
|
||||||
if (isValidIndex(maxInDIDX))
|
if (IsValidIndex(maxInDIDX))
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
string comment = XEQMSupportToken + " Max In D ...";
|
string comment = XEQMSupportToken + " Max In D ...";
|
||||||
|
|||||||
Reference in New Issue
Block a user