From 8f97666d9e23c907fdafba86287ca86d0221df9d Mon Sep 17 00:00:00 2001 From: yanweidong Date: Fri, 4 Sep 2026 21:21:54 +0800 Subject: [PATCH] fix bug --- py-client/strategy/trend/boot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py-client/strategy/trend/boot.py b/py-client/strategy/trend/boot.py index acebb16..b248665 100644 --- a/py-client/strategy/trend/boot.py +++ b/py-client/strategy/trend/boot.py @@ -86,7 +86,11 @@ def StartTrend() -> None: DEFAULT_TICK_INTERVAL = 30 while True: - current_sec = time.localtime().tm_sec + lt = time.localtime() + if (lt.tm_hour, lt.tm_min, lt.tm_sec) >= (15, 0, 0): + log.info("[Trend] 已到 15:00,结束趋势策略") + return + current_sec = lt.tm_sec # 计算距离下一个目标时间点(0秒或30秒)的等待时间 if current_sec < DEFAULT_TICK_INTERVAL: