ignore zero tp sl signals and turn off long time trades closing ....

This commit is contained in:
2024-06-06 08:58:48 +03:30
parent b6323751cd
commit 928269ab99
2 changed files with 9 additions and 3 deletions
+6 -3
View File
@@ -1444,7 +1444,7 @@ struct X121ProviderDescriptor
// //
for (int i = 0; i < signallersCount; i++) for (int i = 0; i < signallersCount; i++)
{ {
// //
// Check all Markets for Long Conditions ... // Check all Markets for Long Conditions ...
// //
@@ -2005,7 +2005,7 @@ struct X121ProviderDescriptor
// Now Select Minimum SL ... // Now Select Minimum SL ...
if (IsValidSize(ArraySize(sls))) if (IsValidSize(ArraySize(sls)))
{ {
slPrice = GetMin(sls); slPrice = GetAverage(sls);
} }
// //
@@ -2046,7 +2046,7 @@ struct X121ProviderDescriptor
); );
if (mSL == 0 && mTP == 0) if (mSL == 0 && mTP == 0)
{ {
Print("Zero TP/SL ..."); continue;
} }
// //
@@ -2074,6 +2074,9 @@ struct X121ProviderDescriptor
iSignal, iSignal,
this.signals // this.signals //
); );
//
this.provider.SetWaitsUntilNewBar(true);
} }
} }
+3
View File
@@ -213,6 +213,7 @@ bool InitialEA()
x786Signaller.Default(); x786Signaller.Default();
x786Signaller.allowLong = x121EAAllowLong; x786Signaller.allowLong = x121EAAllowLong;
x786Signaller.allowShort = x121EAAllowShort; x786Signaller.allowShort = x121EAAllowShort;
x786Signaller.maxAllowedOpenPositionAge = 0;
x786Signaller.minRequiredProfitPerTrade = 0; x786Signaller.minRequiredProfitPerTrade = 0;
x786Signaller.openNextPositionOnProfit = false; x786Signaller.openNextPositionOnProfit = false;
x786Signaller.delayBetweenTwoSameTypeSignals = 6; x786Signaller.delayBetweenTwoSameTypeSignals = 6;
@@ -223,6 +224,7 @@ bool InitialEA()
x121Signaller.Default(); x121Signaller.Default();
x121Signaller.allowLong = x121EAAllowLong; x121Signaller.allowLong = x121EAAllowLong;
x121Signaller.allowShort = x121EAAllowShort; x121Signaller.allowShort = x121EAAllowShort;
x121Signaller.maxAllowedOpenPositionAge = 0;
x121Signaller.minRequiredProfitPerTrade = 0; x121Signaller.minRequiredProfitPerTrade = 0;
x121Signaller.openNextPositionOnProfit = false; x121Signaller.openNextPositionOnProfit = false;
x121Signaller.delayBetweenTwoSameTypeSignals = 6; x121Signaller.delayBetweenTwoSameTypeSignals = 6;
@@ -233,6 +235,7 @@ bool InitialEA()
x110Signaller.Default(); x110Signaller.Default();
x110Signaller.allowLong = x121EAAllowLong; x110Signaller.allowLong = x121EAAllowLong;
x110Signaller.allowShort = x121EAAllowShort; x110Signaller.allowShort = x121EAAllowShort;
x110Signaller.maxAllowedOpenPositionAge = 0;
x110Signaller.minRequiredProfitPerTrade = 0; x110Signaller.minRequiredProfitPerTrade = 0;
x110Signaller.openNextPositionOnProfit = false; x110Signaller.openNextPositionOnProfit = false;
x110Signaller.delayBetweenTwoSameTypeSignals = 6; x110Signaller.delayBetweenTwoSameTypeSignals = 6;