修改斐波平仓后交易记录识别

This commit is contained in:
dekun
2026-05-19 10:16:20 +08:00
parent 1c235a57d8
commit c5cf034ead
3 changed files with 16 additions and 7 deletions
+10
View File
@@ -48,6 +48,16 @@ def stored_key_signal_type(monitor_type):
return None
def key_signal_type_for_trade_record(key_signal_type, box_auto_types):
"""平仓写入 trade_records 时保留箱体/收敛/斐波来源。"""
kst = (key_signal_type or "").strip()
if kst in FIB_KEY_MONITOR_TYPES:
return kst
if box_auto_types and kst in box_auto_types:
return kst
return None
def fib_invalidate_by_mark(direction, mark_price, upper, lower):
"""先触达止盈侧(标记价)则失效。多:mark>=H;空:mark<=L。"""
try: