在策略代码中添加时间判断逻辑:
python运行
def handle_data(context, data):
# 获取当前时间
current_time = context.current_time
# 设置运行时段为 9:30-14:55
if current_time.hour == 9 and current_time.minute 55:
return
if current_time.hour > 14 or current_time.hour < 9:
return
发布于2025-5-22 17:00 武汉

