Fix embed date filter reload and classify profitable stops as trailing TP.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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) == "止盈"
|
||||
Reference in New Issue
Block a user