using FinlyticCore.Models.Settings; namespace FinlyticEngine.Settings; public static class EngineSettingKeys { // --- 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 EngineChannel = new("Logging.Channel.Engine", true); public static readonly SettingKey ScoringChannel = new("Logging.Channel.Scoring", true); public static readonly SettingKey AiValidationChannel = new("Logging.Channel.AiValidation", true); public static readonly SettingKey DerivativesChannel = new("Logging.Channel.Derivatives", true); public static readonly SettingKey TradeLifecycleChannel = new("Logging.Channel.TradeLifecycle", true); // --- Scoring & Multi-Factor Weights --- public static readonly SettingKey MinCompositeScore = new("Engine.MinCompositeScore", 75.0m); public static readonly SettingKey WeightTechnical = new("Engine.WeightTechnical", 0.45m); public static readonly SettingKey WeightSentiment = new("Engine.WeightSentiment", 0.35m); public static readonly SettingKey WeightFundamental = new("Engine.WeightFundamental", 0.20m); public static readonly SettingKey EarningsLockoutDays = new("Engine.EarningsLockoutDays", 2); /// /// Number of days before (and including) the ex-dividend date during which the composite score is /// moderately suppressed (see CompositeOpportunityScorer's dividend gate). Smaller than /// 's default because an ex-dividend price adjustment is a predictable, /// mechanical gap-down (roughly the dividend amount), not a fundamental surprise like earnings. /// public static readonly SettingKey DividendGateDays = new("Engine.DividendGateDays", 1); // --- Knock-Out & Derivative Rules --- public static readonly SettingKey MinDerivativeLeverage = new("Engine.MinDerivativeLeverage", 5.0m); public static readonly SettingKey TargetDefaultLeverage = new("Engine.TargetDefaultLeverage", 7.0m); public static readonly SettingKey KnockOutSafetyBufferPercent = new("Engine.KnockOutSafetyBufferPercent", 2.0m); /// /// Seconds to wait for the n8n AI validation webhook before falling back to a rule-based decision. Was /// previously a hardcoded TimeSpan.FromSeconds(15) literal in AiReasoningGateService /// (Rules.md §12 forbids hardcoded values). /// public static readonly SettingKey AiValidationTimeoutSeconds = new("Engine.AiValidationTimeoutSeconds", 15); // --- Feature Toggles & Intervals --- public static readonly SettingKey EnableAiValidation = new("Engine.EnableAiValidation", true); public static readonly SettingKey EnablePaperTradingBot = new("Engine.EnablePaperTradingBot", false); public static readonly SettingKey PollingIntervalSeconds = new("Engine.PollingIntervalSeconds", 120); public static readonly SettingKey MonitoringIntervalSeconds = new("Engine.MonitoringIntervalSeconds", 60); /// /// Minimum FinlyticTechnicals quality score a setup must clear before OpportunityPollerBackgroundService /// even asks the Engine to evaluate it. Was previously a hardcoded 70.0m literal on the ta_GetSetups /// request - not shown/tunable anywhere, and the reason "why don't I see any automatic evaluations" was /// impossible to answer from the admin UI. /// public static readonly SettingKey PollerMinScore = new("Engine.PollerMinScore", 70.0m); /// /// When true, the poller only requests FinlyticTechnicals' top-picks (quality score >= 75); when false it /// also considers any setup that cleared without being a top pick. /// public static readonly SettingKey PollerTopPicksOnly = new("Engine.PollerTopPicksOnly", true); /// Maximum number of setups FinlyticTechnicals returns per poll cycle. public static readonly SettingKey PollerLimit = new("Engine.PollerLimit", 25); /// /// Number of hours a freshly created trade proposal stays acceptable before it self-invalidates via /// ExpiresAtUtc (see FinlyticEngine.Services.Trading.TradeLifecycleService.EvaluateAssetAsync). /// Rules.md §12 forbids hardcoded values, so this was previously an inline AddHours(24) literal. /// public static readonly SettingKey ProposalValidityHours = new("Engine.ProposalValidityHours", 24); }