feat: show entry type as category/subtype (反转/启动A)

Format持仓与交易记录开仓类型为两级展示;新平仓写入与旧短标签自动展开。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-07 00:27:53 +08:00
parent 99eb16dbd8
commit f580e4542d
6 changed files with 105 additions and 14 deletions
+8 -1
View File
@@ -10,6 +10,7 @@ from lib.strategy.strategy_trade_labels import (
entry_reason_for_monitor_type,
)
from lib.trade.time_close_lib import TIME_CLOSE_RESULT
from lib.trade.entry_model_lib import format_entry_type_display
TRADE_COMPLETED_RESULTS = (
"止盈",
@@ -132,7 +133,13 @@ def display_entry_type_label(d: dict) -> str:
label = effective_entry_type(d).strip()
if not label:
return ""
return _normalize_monitor_type_label(label) or label
formatted = format_entry_type_display(
label,
entry_model=d.get("entry_model"),
trade_style=d.get("trade_style"),
)
out = _normalize_monitor_type_label(formatted) or formatted
return out or ""
def effective_hold_minutes(