This commit is contained in:
2024-06-21 13:13:09 +03:30
parent 5e8df132d4
commit 9041f22045
3 changed files with 55 additions and 24 deletions
+33 -9
View File
@@ -2254,15 +2254,39 @@ protected:
// //
// Here we Select Price for SL Trailling ... // Here we Select Price for SL Trailling ...
double usedPrice = double usedPrice = 0;
iPosition.sl > 0 && if (iPosition.sl != 0)
isLong {
? iPosition.sl < iPosition.entry //
? iPosition.entry if (isLong)
: iPosition.sl {
: iPosition.sl > iPosition.entry //
? iPosition.entry if (iPosition.sl < iPosition.entry)
: iPosition.sl; {
usedPrice = iPosition.entry;
}
else
{
usedPrice = iPosition.sl;
}
}
else
{
//
if (iPosition.sl > iPosition.entry)
{
usedPrice = iPosition.entry;
}
else
{
usedPrice = iPosition.sl;
}
}
}
else
{
usedPrice = iPosition.entry;
}
// //
double nextTrailPoint = NextTrailPoint(); double nextTrailPoint = NextTrailPoint();
+8 -1
View File
@@ -544,7 +544,14 @@ public:
} }
// //
result = (double)zone.ticks / CountTicks() * 100; int ticksCount = CountTicks();
if (ticksCount <= 0)
{
return result;
}
//
result = (double)zone.ticks / ticksCount * 100;
result = NormalizeDouble(result, normalizationDigits); result = NormalizeDouble(result, normalizationDigits);
// //
+14 -14
View File
@@ -40,22 +40,22 @@ input int x121EASlippage = 10; // Slippgae
// EURUSDb,GBPUSDb,XAUUSDb,USDCHFb,USDJPYb // EURUSDb,GBPUSDb,XAUUSDb,USDCHFb,USDJPYb
input group "Signals"; input group "Signals";
// EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb,XAUUSDb,NZDUSDb,AUDUSDb,USDCADb,BTCUSD,ETHUSD // EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb,XAUUSDb,NZDUSDb,AUDUSDb,USDCADb,BTCUSD,ETHUSD
input string x121EASymbols = "EURUSDb,USDCHFb,XAUUSDb,USDJPYb,GBPUSDb"; // Symbols input string x121EASymbols = "EURUSDb,USDCHFb,EURCHFb,XAUUSDb,USDJPYb,EURJPYb,GBPUSDb"; // Symbols
input bool x121EAUseAllSymbols = false; // Use All Available Symbols input bool x121EAUseAllSymbols = false; // Use All Available Symbols
input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols
input bool x121EAAllowLong = true; // Allow Long Trades input bool x121EAAllowLong = true; // Allow Long Trades
input bool x121EAAllowShort = true; // Allow Short Trades input bool x121EAAllowShort = true; // Allow Short Trades
input int x121EAReuiredSignalVerifications = 2; // Required Verifications for Signals input int x121EAReuiredSignalVerifications = 5; // Required Verifications for Signals
input bool x121EAGetVerificationFromOtherTimeFrames = true; // Get Verifications from Other Time Frames input bool x121EAGetVerificationFromOtherTimeFrames = true; // Get Verifications from Other Time Frames
// //
// Risk Management ... // Risk Management ...
input group "Risk Management"; input group "Risk Management";
input double x121EAVolume = 0.01; // Static Volume input double x121EAVolume = 0.02; // Static Volume
input double x121EATPPoint = 500; // TP Point input double x121EATPPoint = 1000; // TP Point
input double x121EASLPoint = 500; // SL Point input double x121EASLPoint = 1000; // SL Point
input int x121EAMaxAllowedTrades = 1; // Max Allowed Positions input int x121EAMaxAllowedTrades = 1; // Max Allowed Positions
input bool x121EAIgnoreSL = false; // Ignore Calculated SL input bool x121EAIgnoreSL = true; // Ignore Calculated SL
input bool x121EAIgnoreTP = false; // Ignore Calculated TP input bool x121EAIgnoreTP = false; // Ignore Calculated TP
// //
@@ -69,10 +69,10 @@ input bool x121EACloseOnOpposit = false; // Close all Positions on Opposit
// //
input group "Trailling"; input group "Trailling";
input bool x121EAAllowTrailStop = true; // Enable Trailling Stop Losses input bool x121EAAllowTrailStop = true; // Enable Trailling Stop Losses
input double x121EAFirstTrailDistance = 110; // Start Trailling Distance input double x121EAFirstTrailDistance = 100; // Start Trailling Distance
input double x121EAFirstTrailPoint = 60; // First Stop Trail input double x121EAFirstTrailPoint = 60; // First Stop Trail
input double x121EANextTrailDistance = 50; // Next Trailling Distance input double x121EANextTrailDistance = 50; // Next Trailling Distance
input double x121EANextTrailPoint = 20; // Next Trailling Step input double x121EANextTrailPoint = 25; // Next Trailling Step
// //
input group "Supporting"; input group "Supporting";
@@ -93,7 +93,7 @@ input double x121EAMaxAllowedGridVolume = 0.04; // Max Allowed Grid Signals Volu
// //
input group "Recovery"; input group "Recovery";
input bool x121EAAllowRecovery = false; // Allow Recovery Signals input bool x121EAAllowRecovery = false; // Allow Recovery Signals
input int x121EAMaxNumberOfRecoveries = 3; // Max Number of Recovery Signals input int x121EAMaxNumberOfRecoveries = 2; // 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
input double x121EAMaxAllowedRecoveryVolume = 0.08; // Max Allowed Recovery Signals Volume input double x121EAMaxAllowedRecoveryVolume = 0.08; // Max Allowed Recovery Signals Volume