07.4.4.1.5 — Runtime Window Cleanup & Symbol Lifecycle Isolation

This commit is contained in:
2026-05-11 12:06:00 +03:00
parent 363719cc8e
commit e17f847603
10 changed files with 323 additions and 14 deletions

View File

@@ -17,6 +17,27 @@ class StrategyRegistry:
"SCALP": ScalpStrategy(),
}
# сбросить runtime-память одной стратегии
@classmethod
def reset_runtime(
cls,
name: str | None = None,
*,
symbol: str | None = None,
) -> None:
if name:
strategy = cls.get(name)
strategy.reset_runtime(symbol)
return
for strategy in cls._strategies.values():
strategy.reset_runtime(symbol)
# сбросить runtime-память всех стратегий
@classmethod
def reset_all_runtime(cls) -> None:
cls.reset_runtime()
# получить стратегию по имени
@classmethod
def get(cls, name: str | None) -> BaseStrategy: