This commit is contained in:
2025-05-07 23:53:37 +03:30
parent 32f895407f
commit 2ba019e1f0
5 changed files with 746 additions and 49 deletions
+49 -4
View File
@@ -50,6 +50,17 @@ input double eaConstantRiskBalance = 0.0; // Constant Ri
input double eaConstantPercent = 0.5; // Constant Percent of Balance Per Trade
input double eaConstantBalance = 0.0; // Constant Balance for Calculations
//
// Management ...
input group "Management";
input bool eaAllowTrade = true; // Allow Trade on Signals
input bool eaAllowLongs = true; // Allow Long Trades
input bool eaAllowShorts = true; // Allow Short Trades
input int eaMaxAllowedTradesPerDay = 3; // Max Allowed Trades per Day
input int eaMaxAllowedSLsPerDay = 2; // Max Allowed SL(s) per Day
input string eaSessionStartTime = ""; // Trade Start Time
input string eaSessionEndTime = ""; // Trade End Time
//
// Alert ...
// Here we Provider All Requirements for
@@ -64,10 +75,14 @@ input bool eaTerminalAlerts = false; // Terminal Alerts
//
// Time Report ...
input group "Reports";
input bool eaReportNewMonths = false; // Report New Month
input bool eaReportNewWeeks = false; // Report New Weeks
input bool eaReportNewDays = true; // Report New Days
input bool eaReportNewHours = false; // Report New Hours
input bool eaReportNewMonths = false; // Report New Month
input bool eaReportNewWeeks = false; // Report New Weeks
input bool eaReportNewDays = true; // Report New Days
input bool eaReportNewHours = false; // Report New Hours
input bool eaReportTrades = true; // Report Trades
input bool eaReportSignals = true; // Report Signals
input bool eaReportProtector = true; // Report Protector Actions
input bool eaReportAfterTradesBalance = true; // Report Balance after a Trade Finished
//
// Variables, Instances ...
@@ -327,6 +342,8 @@ void OnTick()
eaSignal.time = eaConditions.time;
eaSignal.symbol = eaConditions.symbol;
eaSignal.period = eaConditions.period;
eaSignal.partialCloseOnTPLevel = eaConditions.partialCloseOnTPLevel;
eaSignal.partialCloseMultiplier = eaConditions.partialCloseMultiplier;
//
Copy(
@@ -627,6 +644,34 @@ void InitRequirements()
eaTradeManager.SetAlertPushAlerts(eaPushAlerts);
eaTradeManager.SetAlertTerminalAlerts(eaTerminalAlerts);
//
// Setting Trade Reports ...
eaTradeManager
.SetTradeReports(
eaReportTrades,
eaReportSignals,
eaReportProtector,
eaReportAfterTradesBalance //
);
//
// Setting Trade Permissions ...
eaTradeManager
.SetTradePermissions(
eaAllowTrade,
eaAllowLongs,
eaAllowShorts //
);
//
//
//
//
// eaMaxAllowedTradesPerDay
// eaMaxAllowedSLsPerDay
// eaSessionStartTime
// eaSessionEndTime
//
// EA Signaller ...
eaSignaller = new XCXCAEASignaller(