optz
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
该模块负责组合 SDK、配置、状态存储和做 T 策略组件,供 main.py 调用。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from concurrent.futures import Future, ThreadPoolExecutor
|
||||
import logging as log
|
||||
import time
|
||||
@@ -143,7 +141,7 @@ def RunOnce(run: Runtime, state: TState, signals: list[SignalItem]) -> None:
|
||||
allow_open: list[SignalItem] = []
|
||||
allow_codes: list[str] = []
|
||||
for signal in signals:
|
||||
if signal.code not in position_codes:
|
||||
if signal.code not in portfolio.positions:
|
||||
allow_open.append(signal)
|
||||
allow_codes.append(signal.code)
|
||||
|
||||
@@ -196,4 +194,4 @@ def _wait_worker(name: str, future: Future) -> None:
|
||||
try:
|
||||
future.result()
|
||||
except Exception:
|
||||
log.exception("[运行] %s线程失败", name)
|
||||
log.exception("[运行] %s线程失败", name)
|
||||
|
||||
Reference in New Issue
Block a user