This commit is contained in:
2024-06-18 14:32:58 +03:30
parent c0210cf07b
commit 144fd90976
+60 -16
View File
@@ -39,11 +39,13 @@ input int x121EASlippage = 10; // Slippgae
// Signals ... // Signals ...
// EURUSDb,GBPUSDb,XAUUSDb,USDCHFb,USDJPYb // EURUSDb,GBPUSDb,XAUUSDb,USDCHFb,USDJPYb
input group "Signals"; input group "Signals";
input string x121EASymbols = "EURUSDb"; // Symbols input string x121EASymbols = "EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb,XAUUSDb,NZDUSDb,AUDUSDb,USDCADb,BTCUSD,ETHUSD"; // Symbols
input bool x121EAAllowLong = true; // Allow Long Trades input bool x121EAUseAllSymbols = false; // Use All Available Symbols
input bool x121EAAllowShort = true; // Allow Short Trades input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols
input int x121EAReuiredSignalVerifications = 4; // Required Verifications for Signals input bool x121EAAllowLong = true; // Allow Long Trades
input bool x121EAGetVerificationFromOtherTimeFrames = true; // Get Verifications from Other Time Frames input bool x121EAAllowShort = true; // Allow Short Trades
input int x121EAReuiredSignalVerifications = 5; // Required Verifications for Signals
input bool x121EAGetVerificationFromOtherTimeFrames = true; // Get Verifications from Other Time Frames
// //
// Risk Management ... // Risk Management ...
@@ -89,7 +91,7 @@ input double x121EAMaxAllowedGridVolume = 0.04; // Max Allowed Grid Signals Volu
// //
input group "Recovery"; input group "Recovery";
input bool x121EAAllowRecovery = true; // Allow Recovery Signals input bool x121EAAllowRecovery = false; // Allow Recovery Signals
input int x121EAMaxNumberOfRecoveries = 3; // Max Number of Recovery Signals input int x121EAMaxNumberOfRecoveries = 3; // Max Number of Recovery Signals
input double x121EARecoveryDistance = 100; // Recovery Distance input double x121EARecoveryDistance = 100; // Recovery Distance
input double x121EARecoveryVolumeMultiplier = 2; // Recovery Volume Multiplier input double x121EARecoveryVolumeMultiplier = 2; // Recovery Volume Multiplier
@@ -182,19 +184,61 @@ bool InitialEA()
TesterHideIndicators(true); TesterHideIndicators(true);
// //
result = IsValid(x121EASymbols); string inputSymbols[];
if (!result) int inputSymbolsCount = SplitContent(
{ inputSymbols,
return result; x121EASymbols //
} );
//
string allSymbols[];
int allSymbolsCount = GetAllSymbols(
allSymbols //
);
//
string watchListSymbols[];
int watchListSymbolsCount = GetAllSymbols(
watchListSymbols,
true //
);
// //
string symbols[]; string symbols[];
int symbolsCount = SplitContent( if (x121EAUseAllSymbols)
symbols, {
x121EASymbols // //
); Copy(
result = symbolsCount > 0; allSymbols,
symbols //
);
}
else if (x121EAUseAllWatchListSymbols)
{
//
Copy(
watchListSymbols,
symbols //
);
}
else if (IsValidSize(inputSymbolsCount))
{
//
Copy(
inputSymbols,
symbols //
);
}
else
{
//
Add(
_Symbol,
symbols //
);
}
int symbolsCount = ArraySize(symbols);
result = IsValidSize(symbolsCount);
if (!result) if (!result)
{ {
return result; return result;