This commit is contained in:
2024-05-27 10:52:50 +03:30
parent 4565082b27
commit 72dc9737f9
2 changed files with 30 additions and 11 deletions
+27 -8
View File
@@ -457,7 +457,7 @@ public:
// Make them Configurable ...
int levelsOnClose = 6;
int requiredAgeForTrail = 0;
int requiredDistanceForTrail = 5;
int requiredDistanceForTrail = 30;
//
int positionsCount = ArraySize(positions);
@@ -531,8 +531,8 @@ public:
//
double sl =
IsLong(iPosition.type)
? iPosition.sl + slDiff
: iPosition.sl - slDiff;
? iPosition.sl + appliedSL
: iPosition.sl - appliedSL;
//
// double sl =
@@ -717,12 +717,13 @@ public:
//
double tpDiff = PointToPrice(priceDistance, iPosition.symbol);
double appliedTP = tpDiff / 2;
//
double tp =
IsLong(iPosition.type)
? iPosition.tp - tpDiff
: iPosition.tp + tpDiff;
? iPosition.tp - appliedTP
: iPosition.tp + appliedTP;
//
bool isInit = trail.Init(
@@ -772,12 +773,13 @@ public:
//
double tpDiff = PointToPrice(priceDistance, iPosition.symbol);
double appliedTP = tpDiff / 2;
//
double tp =
isLong
? iPosition.tp - tpDiff
: iPosition.tp + tpDiff;
? iPosition.tp - appliedTP
: iPosition.tp + appliedTP;
//
// Update Trail Values ...
@@ -827,6 +829,10 @@ public:
// for Volumes and Benefits ...
int HandleSignalManagement(XSignal &signals[]) override
{
//
// TODO: Make this Configurable ...
int minDistanceBetweenTwoSameProviderSignal = 7;
//
int result = 0;
@@ -910,7 +916,20 @@ public:
else if (positionsCount < 2)
{
//
// First Signal in a While of Specific Provider ...
// Next Signal in a While of Specific Provider ...
//
// Find Longest Position and Check it's Age ...
// Compare it by min age for same provider signals ...
XPosition youngest;
int youngestAge = GetYoungest(
youngest,
positions //
);
if (youngestAge == -1 || youngestAge < minDistanceBetweenTwoSameProviderSignal)
{
continue;
}
//
AddRef(
+3 -3
View File
@@ -195,7 +195,7 @@ bool InitialEA()
Add(X110, signallers);
Add(X121, signallers);
Add(X128, signallers);
Add(X92, signallers);
// Add(X92, signallers);
// GetAllX121SignalProviders(signallers);
//
@@ -330,8 +330,8 @@ void ConfigureDescriptor(
//
// XZG ...
iDescriptor.inputs.zgInputs.showZigZag = false;
iDescriptor.inputs.zgInputs.showPeaksAndVales = false;
iDescriptor.inputs.zgInputs.showZigZag = true;
iDescriptor.inputs.zgInputs.showPeaksAndVales = true;
//
// XDON ...