Make symbol risk guard configurable
This commit is contained in:
@@ -115,6 +115,7 @@ class Settings:
|
||||
kelly_max_fraction: float
|
||||
risk_per_trade_percent: float
|
||||
risk_guard_enabled: bool
|
||||
risk_symbol_guard_enabled: bool
|
||||
risk_recent_trade_window: int
|
||||
risk_max_consecutive_losses: int
|
||||
risk_min_recent_profit_factor: float
|
||||
@@ -265,6 +266,7 @@ def load_settings(env_file: str | Path | None = None) -> Settings:
|
||||
kelly_max_fraction=_float_env("KELLY_MAX_FRACTION", 0.20),
|
||||
risk_per_trade_percent=_float_env("RISK_PER_TRADE_PERCENT", 0.01),
|
||||
risk_guard_enabled=_bool_env("RISK_GUARD_ENABLED", True),
|
||||
risk_symbol_guard_enabled=_bool_env("RISK_SYMBOL_GUARD_ENABLED", True),
|
||||
risk_recent_trade_window=_int_env("RISK_RECENT_TRADE_WINDOW", 20),
|
||||
risk_max_consecutive_losses=_int_env("RISK_MAX_CONSECUTIVE_LOSSES", 4),
|
||||
risk_min_recent_profit_factor=_float_env("RISK_MIN_RECENT_PROFIT_FACTOR", 0.85),
|
||||
|
||||
Reference in New Issue
Block a user