This commit is contained in:
2025-02-16 05:08:13 +03:30
parent 54c4fb7e3a
commit 62bfa7760c
7 changed files with 2450 additions and 78 deletions
+17 -17
View File
@@ -38,7 +38,7 @@ input string eaLogSuffix = ""; // Log Suffix
//
// Symbols ...
input group "Symbols";
input bool eaMultiSymbol = false; // Use Multi Symbol
input bool eaMultiSymbol = false; // Use Multi Symbol
input string eaSymbols = "EURUSDb,GBPUSDb,USDCHFb,USDJPYb,XAUUSDb"; // Trading Symbols
//
@@ -58,25 +58,25 @@ input int eaMinRequiredVerificationForSpreadPass = 20; // Minimum Spread Ver
// Trade ...
input group "Trade";
input bool eaAllowTrade = true; // Allow Open Trade On Signals
input string eaStartTradeAt = "2:00"; // Enable Trade on Signals on Time
input string eaStopTradeAt = "21:00"; // Enable Trade on Signals on Time
input string eaStartTradeAt = ""; // Enable Trade on Signals on Time
input string eaStopTradeAt = ""; // Enable Trade on Signals on Time
input string eaCloseAllTradesAt = ""; // Enable Close All Trades on Signals on Time
//
// Risk Management ...
input group "Risk Management";
input double eaR2R = 4; // Signallers Risk to Reward Ratio
input double eaVolume = 0; // Static Volume
input double eaStaticBalance = 1000; // Static Balance
input double eaBalancePerTrade = 10; // Balance Used in Each Trade
input double eaRiskPercentPerBalance = 0; // Risk Percent Per Balance in Each Trade
input bool eaDynamicRiskManagement = false; // Dynamic Risk Management
input bool eaUseDynamicVolume = false; // Use Dynamic Volume
input double eaDynamicVolumeStep = 0.01; // Increase Volume Step
input double eaDynamicVolumeBalanceFactor = 200; // Balance Factor for Generate Dynamic Volume
input double eaMaxAllowedDrawdownToOpenTrades = 3; // Max Allowed Drawdown for Open Trades
input int eaMaxAllowedSLToPauseSignallingPerSymbol = 2; // Max Allowed SL for Pause Signalling Per Symbol
input int eaPauseSignallingAfterReachesMaxAllowedSLInSecconds = 7200; // Pause Signalling Per Symbol afte Max Allowed SL Reached In Seconds
input double eaR2R = 6; // Signallers Risk to Reward Ratio
input double eaVolume = 0; // Static Volume
input double eaStaticBalance = 1000; // Static Balance
input double eaBalancePerTrade = 10; // Balance Used in Each Trade
input double eaRiskPercentPerBalance = 0; // Risk Percent Per Balance in Each Trade
input bool eaDynamicRiskManagement = false; // Dynamic Risk Management
input bool eaUseDynamicVolume = false; // Use Dynamic Volume
input double eaDynamicVolumeStep = 0.01; // Increase Volume Step
input double eaDynamicVolumeBalanceFactor = 200; // Balance Factor for Generate Dynamic Volume
input double eaMaxAllowedDrawdownToOpenTrades = 3; // Max Allowed Drawdown for Open Trades
input int eaMaxAllowedSLToPauseSignallingPerSymbol = 2; // Max Allowed SL for Pause Signalling Per Symbol
input int eaPauseSignallingAfterReachesMaxAllowedSLInSecconds = 10800; // Pause Signalling Per Symbol afte Max Allowed SL Reached In Seconds
//
// Protection ...
@@ -84,7 +84,7 @@ input group "Protection";
input bool eaAllowHedging = true; // Allow Hedge Positions
input int eaMinOpenTradesFroHedging = 4; // Minimum Open Positions for Hedging
input double eaHedgingMinVolumeStep = 0.01; // Minimum Volume Step for Hedging
input double eaHedgeingMinRequiredProfitPerVolumeStep = 2.0; // Minimum Required Profit Per Volume Step for Hedging
input double eaHedgeingMinRequiredProfitPerVolumeStep = 4.0; // Minimum Required Profit Per Volume Step for Hedging
//
// Alert ...
@@ -265,7 +265,7 @@ void OnTick()
// Handle On Trade Event ...
void OnTrade()
{
eaExpert.HandleOnTrade();
eaExpert.HandleOnTrade();
}
//
+46
View File
@@ -6773,6 +6773,52 @@ double GetFibonacciLevel(
return result;
}
//
double GetFibonacciLevel(
double mUp,
double mDown,
ENUM_X_FIBO_LEVELS mLevel,
ENUM_X_DIRECTION mForDir //
)
{
//
double result = 0;
//
double levelValue = GetFiboLevelValue(mLevel);
//
bool isValid =
//
mUp > 0 &&
mDown > 0 &&
levelValue > 0 &&
mUp > mDown &&
HasDirection(mForDir)
//
;
if (!isValid)
{
return result;
}
//
bool isBullish = IsBullish(mForDir);
//
double ling = mUp - mDown;
double pLevel = (ling / 100) * (levelValue * 100);
//
result =
isBullish
? mUp - pLevel
: mDown + pLevel;
//
return result;
}
//
// Method 1
// Normalize between 1 and 0 ...
+1 -1
View File
@@ -6023,7 +6023,7 @@ struct XBoxZone
lower > 0 &&
from < to &&
IsValid(to) &&
upper > lower &&
upper >= lower &&
IsValid(from) &&
IsValid(symbol) &&
IsValid(period)
@@ -992,6 +992,22 @@ class XC121SMCExpert : public XCBaseExpert
false // ignore Policies ...
);
}
else
{
//
string msg = "Failed To Execute " +
(IsLong(signal.type)
? "Long"
: "Short") +
" Signal Recieved: (" +
signal.provider + "," +
signal.symbol + "," +
ToString(signal.period) +
") due Trading offTime ...";
//
Alert(msg);
}
}
else
{
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -583,7 +583,7 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
// XWZ Signal ...
bool DetectXWZSignal(
X121SMCStrategyConditions &conditions,
X121SMCStrategyXWZSignalConditions &xSupDemOBSConditions //
X121SMCStrategyXWZSignalConditions &xWZConditions //
)
{
//
@@ -804,7 +804,7 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
conditions.target = mConditions.target;
//
xSupDemOBSConditions = mConditions;
xWZConditions = mConditions;
//
mConditions.Clean();