last works on recovery ...
This commit is contained in:
@@ -4767,7 +4767,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
//
|
||||
XPosition positions[];
|
||||
int positionsCount = mTrader.GetPositions(
|
||||
positions,
|
||||
@@ -4847,6 +4847,9 @@ public:
|
||||
//
|
||||
string msg = "EQM Done Recovery (" + ToString(closeds) + ") Positions ...";
|
||||
Alert(msg);
|
||||
|
||||
//
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5106,7 +5109,8 @@ public:
|
||||
//
|
||||
// Current Profit ...
|
||||
double distanceInPoints = (MathAbs(profit) / volume);
|
||||
double _volume = volume * ((mData[i].recoveryLevel + 1) * recoveryVolumeMultiplier);
|
||||
double _volumeMultiplier = ((mData[i].recoveryLevel) * recoveryVolumeMultiplier);
|
||||
double _volume = volume * (_volumeMultiplier <= 0 ? 1 : _volumeMultiplier);
|
||||
string _comment = GenerateRecoveryTag(ticket);
|
||||
|
||||
//
|
||||
@@ -5191,7 +5195,11 @@ public:
|
||||
else
|
||||
{
|
||||
//
|
||||
bool canRecover = distanceInPoints >= recoverySLPoint;
|
||||
bool canRecover =
|
||||
distanceInPoints >= recoverySLPoint &&
|
||||
(mData[i].recoveryLevel == 0 ||
|
||||
(mData[i].recoveryLevel >= 2 &&
|
||||
mData[i].recoveryLevel / 2 == 0));
|
||||
if (canRecover)
|
||||
{
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user