中控条件开仓单:客户端本地监控穿越/偏离区并按本机规则开平仓。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-03 02:13:16 +08:00
parent 3577a4d2fd
commit 2eb6b28a39
8 changed files with 996 additions and 2 deletions
+6
View File
@@ -440,6 +440,7 @@ def options_monitor_loop(
profit_exit_close_fn: Callable[[str], dict[str, Any]] | None = None,
profit_exit_cfg: dict[str, Any] | None = None,
stale_pending_fn: Callable[[], dict[str, Any]] | None = None,
cond_order_tick_fn: Callable[[sqlite3.Connection], None] | None = None,
stop_event: Any = None,
) -> None:
if not enabled:
@@ -450,6 +451,11 @@ def options_monitor_loop(
try:
conn = get_db()
try:
if cond_order_tick_fn is not None:
try:
cond_order_tick_fn(conn)
except Exception:
pass
positions = fetch_positions()
run_options_profit_alerts(
conn,