diff --git a/api/main.py b/api/main.py index b649635..181b15d 100644 --- a/api/main.py +++ b/api/main.py @@ -581,7 +581,10 @@ class DashboardState: from strategy.exits import ExitConfig from strategy.population import PopulationConfig - MAX_SESSIONS = 45 + # cap protects the (serialized) request thread; 300 spans the full stored + # minute-bar history (~273 sessions) so months-scale ranges work via + # since/until — a full-history request runs minutes, operator's choice. + MAX_SESSIONS = int(os.environ.get("BACKTEST_MAX_SESSIONS", "300")) pop = PopulationConfig.from_env() regime_on = os.environ.get("TRADING_REGIME_GATE_ENABLED", "0").strip().lower() in { "1", "true", "yes", "on"}