feat: signal-engine配置热加载,改paper_config不需要重启
- 每60轮(~15分钟)自动重读paper_config.json - 检测enabled_strategies变更时输出日志 - 避免频繁重启导致: - 4h历史数据重新回灌 - CVD/VWAP窗口状态丢失 - 45秒warmup+10分钟冷却期 - 信号准确度下降
This commit is contained in:
parent
3b6e7d8af3
commit
855df24eba
@ -1058,7 +1058,12 @@ def main():
|
|||||||
warmup_cycles -= 1
|
warmup_cycles -= 1
|
||||||
if warmup_cycles == 0:
|
if warmup_cycles == 0:
|
||||||
logger.info("冷启动保护期结束,模拟盘开仓已启用")
|
logger.info("冷启动保护期结束,模拟盘开仓已启用")
|
||||||
|
# 每60轮(约15分钟)热加载配置,不需要重启
|
||||||
if cycle % 60 == 0:
|
if cycle % 60 == 0:
|
||||||
|
old_strategies = list(PAPER_ENABLED_STRATEGIES)
|
||||||
|
load_paper_config()
|
||||||
|
if list(PAPER_ENABLED_STRATEGIES) != old_strategies:
|
||||||
|
logger.info(f"📋 配置热加载: enabled_strategies={PAPER_ENABLED_STRATEGIES}")
|
||||||
for sym, state in states.items():
|
for sym, state in states.items():
|
||||||
logger.info(
|
logger.info(
|
||||||
f"[{sym}] 状态: CVD_fast={state.win_fast.cvd:.1f} "
|
f"[{sym}] 状态: CVD_fast={state.win_fast.cvd:.1f} "
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user