add XTargetManager Class and use it in XBacktesterEA Class ...

also i have to implement it's usage on XCExpert Class ...
extends XTarget approaches and add support to Distances ...
This commit is contained in:
2025-10-01 17:16:13 +03:30
parent 684d3028c4
commit 2669790493
7 changed files with 1054 additions and 201 deletions
+41
View File
@@ -719,6 +719,7 @@ struct XTarget
//
// Props ...
bool doRF; // Do RF on Target
double actingDistance; // Acting Distances
double target; // Target Price for Actions
double volumeMultiplier; // Volume Multiplier for Partial Close
@@ -739,6 +740,7 @@ struct XTarget
//
target = 0;
doRF = false;
actingDistance = 0;
volumeMultiplier = 0;
}
@@ -5688,6 +5690,45 @@ void ApplyTargetsOnSignal(
targets //
);
//
// Compare TP with Targets ...
int idx = IsLong(signal.type)
? GetHighest(targets)
: GetLowest(targets);
has = IsValidIndex(idx);
if (has)
{
//
// Compare TP ...
has = IsLong(signal.type)
? targets[idx].target > signal.tp
: targets[idx].target < signal.tp;
if (has)
{
//
XTarget tpTarget;
tpTarget = targets[idx];
tpTarget.target = signal.tp;
signal.tp = targets[idx].target;
ArrayRemove(
targets,
idx,
1 //
);
AddRef(
tpTarget,
targets //
);
}
//
// Sort Targets ...
ApplySortOnTargets(
sortingDir,
targets //
);
}
//
Copy(
targets,