Fix embed date filter reload and classify profitable stops as trailing TP.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-25 11:27:42 +08:00
parent 924a385d6c
commit 2dadd93d91
9 changed files with 95 additions and 74 deletions
+17
View File
@@ -0,0 +1,17 @@
from trade_result_lib import normalize_result_with_pnl
def test_stop_loss_with_profit_becomes_trailing_tp():
assert normalize_result_with_pnl("止损", 4.33) == "移动止盈"
def test_manual_close_unchanged_even_with_profit():
assert normalize_result_with_pnl("手动平仓", 10) == "手动平仓"
def test_stop_loss_with_loss_unchanged():
assert normalize_result_with_pnl("止损", -2.5) == "止损"
def test_take_profit_unchanged():
assert normalize_result_with_pnl("止盈", 5) == "止盈"