last ...
This commit is contained in:
@@ -39,11 +39,13 @@ input int x121EASlippage = 10; // Slippgae
|
||||
// Signals ...
|
||||
// EURUSDb,GBPUSDb,XAUUSDb,USDCHFb,USDJPYb
|
||||
input group "Signals";
|
||||
input string x121EASymbols = "EURUSDb"; // Symbols
|
||||
input bool x121EAAllowLong = true; // Allow Long Trades
|
||||
input bool x121EAAllowShort = true; // Allow Short Trades
|
||||
input int x121EAReuiredSignalVerifications = 4; // Required Verifications for Signals
|
||||
input bool x121EAGetVerificationFromOtherTimeFrames = true; // Get Verifications from Other Time Frames
|
||||
input string x121EASymbols = "EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb,XAUUSDb,NZDUSDb,AUDUSDb,USDCADb,BTCUSD,ETHUSD"; // Symbols
|
||||
input bool x121EAUseAllSymbols = false; // Use All Available Symbols
|
||||
input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols
|
||||
input bool x121EAAllowLong = true; // Allow Long Trades
|
||||
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 ...
|
||||
@@ -89,7 +91,7 @@ input double x121EAMaxAllowedGridVolume = 0.04; // Max Allowed Grid Signals Volu
|
||||
|
||||
//
|
||||
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 double x121EARecoveryDistance = 100; // Recovery Distance
|
||||
input double x121EARecoveryVolumeMultiplier = 2; // Recovery Volume Multiplier
|
||||
@@ -182,19 +184,61 @@ bool InitialEA()
|
||||
TesterHideIndicators(true);
|
||||
|
||||
//
|
||||
result = IsValid(x121EASymbols);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
string inputSymbols[];
|
||||
int inputSymbolsCount = SplitContent(
|
||||
inputSymbols,
|
||||
x121EASymbols //
|
||||
);
|
||||
|
||||
//
|
||||
string allSymbols[];
|
||||
int allSymbolsCount = GetAllSymbols(
|
||||
allSymbols //
|
||||
);
|
||||
|
||||
//
|
||||
string watchListSymbols[];
|
||||
int watchListSymbolsCount = GetAllSymbols(
|
||||
watchListSymbols,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
string symbols[];
|
||||
int symbolsCount = SplitContent(
|
||||
symbols,
|
||||
x121EASymbols //
|
||||
);
|
||||
result = symbolsCount > 0;
|
||||
if (x121EAUseAllSymbols)
|
||||
{
|
||||
//
|
||||
Copy(
|
||||
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)
|
||||
{
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user