Add ATM open-offset toggle default off.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-25 12:42:20 +08:00
parent 79c074ec6c
commit fff285c1f9
12 changed files with 93 additions and 24 deletions
+5 -3
View File
@@ -80,6 +80,8 @@ def test_atm_allows_open_offset() -> None:
from app.strategy.selection import atm_allows_open, atm_open_offset
assert atm_open_offset(1850, 1852.5) == 2.5
assert atm_allows_open(1850, 1852.5, max_offset=3) is True
assert atm_allows_open(1850, 1854, max_offset=3) is False
assert atm_allows_open(1850, 1860, max_offset=3) is False
# 默认关闭:不限制
assert atm_allows_open(1850, 1860, max_offset=3, enabled=False) is True
assert atm_allows_open(1850, 1852.5, max_offset=3, enabled=True) is True
assert atm_allows_open(1850, 1854, max_offset=3, enabled=True) is False
assert atm_allows_open(1850, 1860, max_offset=3, enabled=True) is False