This commit is contained in:
2024-05-28 16:32:17 +03:30
parent 651e3d7c1e
commit dd276cf704
3 changed files with 31 additions and 9 deletions
+6
View File
@@ -353,6 +353,12 @@ public:
// Make them Configurable ... // Make them Configurable ...
int numberOfPositionsForHege = 3; int numberOfPositionsForHege = 3;
//
if (!IsHedgeEnable())
{
return;
}
// //
int positionsCount = ArraySize(positions); int positionsCount = ArraySize(positions);
if (positionsCount <= 0) if (positionsCount <= 0)
+15
View File
@@ -2411,6 +2411,21 @@ public:
mMinProfitPerVolumeFactor = value; mMinProfitPerVolumeFactor = value;
} }
//
bool IsHedgeEnable()
{
//
bool result =
//
mMinProfitPerTrade > 0 &&
mMinProfitPerVolumeFactor > 0
//
;
//
return result;
}
// //
// Alert ... // Alert ...
+9 -8
View File
@@ -31,9 +31,9 @@
// //
// Inputs ... // Inputs ...
long x121EAMagicNumber = 78692110; // Magic Number long x121EAMagicNumber = 78692110; // Magic Number
int x121EASlippage = 10; // Slippgae int x121EASlippage = 10; // Slippgae
string x121EASymbols = "EURUSDb,USDCHFb,USDJPYb,GBPUSDb,XAUUSDb,AUDUSDb,USDCADb,NZDUSDb"; // Symbols string x121EASymbols = "EURUSDb"; // Symbols
// //
bool x121EAAllowLong = true; // Allow Long Trades bool x121EAAllowLong = true; // Allow Long Trades
bool x121EAAllowShort = true; // Allow Short Trades bool x121EAAllowShort = true; // Allow Short Trades
@@ -191,11 +191,12 @@ bool InitialEA()
// //
// Define Signallers ... // Define Signallers ...
ENUM_X121_SIGNAL_PROVIDERS signallers[]; ENUM_X121_SIGNAL_PROVIDERS signallers[];
Add(X786, signallers); // Add(X786, signallers);
Add(X110, signallers); // Add(X110, signallers);
Add(X121, signallers); // Add(X121, signallers);
Add(X128, signallers); // Add(X128, signallers);
Add(X92, signallers); // Add(X92, signallers);
Add(XTEST, signallers);
// GetAllX121SignalProviders(signallers); // GetAllX121SignalProviders(signallers);
// //