using FinlyticCore.Models.Settings; namespace FinlyticSimulation.Settings; public static class SimulationSettingKeys { // --- Logging Channels --- public static readonly SettingKey HealthPingChannel = new("Logging.Channel.Health", true); public static readonly SettingKey MqttChannel = new("Logging.Channel.MQTT", true); public static readonly SettingKey SimulationChannel = new("Logging.Channel.Simulation", true); public static readonly SettingKey MatrixChannel = new("Logging.Channel.Matrix", true); // --- Simulation & Fee Defaults --- public static readonly SettingKey DefaultSlippagePercent = new("Simulation.DefaultSlippagePercent", 0.0m); // 0.00% (Market frictions are accounted for via transaction fees) public static readonly SettingKey DefaultOrderFeeEur = new("Simulation.DefaultOrderFeeEur", 1.00m); // 1.00 € pro Order public static readonly SettingKey DefaultStartingCapital = new("Simulation.DefaultStartingCapital", 10000m); public static readonly SettingKey MinSampleTradesForApproval = new("Simulation.MinSampleTradesForApproval", 5); public static readonly SettingKey HighProfitFactorThreshold = new("Simulation.HighProfitFactorThreshold", 1.60m); public static readonly SettingKey LowProfitFactorThreshold = new("Simulation.LowProfitFactorThreshold", 1.00m); /// /// Simulated knock-out derivative barrier distance below (long) / above (short) the strategy's stop-loss, /// as a percent. Was previously a hardcoded 2% (0.98/1.02 multiplier) in VirtualBacktestBroker. /// public static readonly SettingKey KnockOutBarrierBufferPercent = new("Simulation.KnockOutBarrierBufferPercent", 2.0m); /// /// Fallback trailing-stop distance (as a percent of the current close) used once a position's TP1 has /// been hit, for any TrailingStopRule.Type other than /// (which is instead simulated honestly via that rule's own ATR multiplier - see VirtualBacktestBroker.UpdateActivePositions). /// SuperTrendLine/SwingPoints rules would require recomputing that live indicator on every /// backtest bar, which this broker does not have the inputs for; this flat, configurable percent is an /// explicit, documented approximation for those two rule types rather than silently reusing the ATR /// multiplier's numeric value for an unrelated rule type (the previous hardcoded behavior). /// public static readonly SettingKey DefaultTrailingStopPercent = new("Simulation.DefaultTrailingStopPercent", 3.0m); /// /// Whether ReliabilityMatrixRecomputeBackgroundService periodically re-runs backtests for every /// (Isin, StrategyKey, Timeframe) combination already present in the reliability matrix, instead of that /// data only ever being refreshed when a human happens to manually re-run the same backtest. /// public static readonly SettingKey EnableScheduledMatrixRecompute = new("Simulation.EnableScheduledMatrixRecompute", true); /// /// How old a reliability-matrix row (SimulationStrategyMatrixEntity.UpdatedAtUtc) must be before /// ReliabilityMatrixRecomputeBackgroundService refreshes it again. /// public static readonly SettingKey MatrixRecomputeIntervalHours = new("Simulation.MatrixRecomputeIntervalHours", 24); /// How often ReliabilityMatrixRecomputeBackgroundService checks for stale matrix rows. public static readonly SettingKey MatrixRecomputeCheckIntervalMinutes = new("Simulation.MatrixRecomputeCheckIntervalMinutes", 60); }