中控条件开仓单:客户端本地监控穿越/偏离区并按本机规则开平仓。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user