This commit is contained in:
2024-07-28 14:16:13 +03:30
parent 0e3df1a494
commit be741a0ebd
3 changed files with 383 additions and 50 deletions
+12 -7
View File
@@ -3507,7 +3507,7 @@ struct XTradeData
(maxDrawdown == 0 ||
MathAbs(profit) > MathAbs(maxDrawdown)))
{
profit = maxDrawdown;
maxDrawdown = profit;
}
//
@@ -3785,18 +3785,22 @@ struct XTradeData
// Recovery ...
//
bool allowRecover; // Allow Recover Specified Position
double recoveryTPPoint; // Recovery TP Point
double recoverySLPoint; // Recovery SL Point
int maxAllowedRecover; // Max Allowed Recovery
bool allowRecover; // Allow Recover Specified Position
double recoveryTPPoint; // Recovery TP Point
double recoverySLPoint; // Recovery SL Point
int maxAllowedRecover; // Max Allowed Recovery
int recoveryLevel; // Number of Recovery Signals
double recoveryVolumeMultiplier; // Recovery Volume Multiplier
//
void ResetRecovery()
{
//
allowRecover = false;
recoveryLevel = 0;
recoveryTPPoint = 0;
recoverySLPoint = 0;
recoveryVolumeMultiplier = 0;
}
//
@@ -5418,8 +5422,9 @@ int ExtractRecoveries(
XPosition iSource = source[i];
//
ulong isRecovery = ExtractRecoveredTicket(iSource.comment) > 0;
if (isRecovery && iSource.ticket == ticket)
ulong parentTicket = ExtractRecoveredTicket(iSource.comment);
bool isRecovery = parentTicket > 0;
if (isRecovery && parentTicket == ticket)
{
//
AddRef(