fix: 突破加仓按 mark 触价触发,避免漏单
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -49,10 +49,18 @@ def test_fib_cross_long_down():
|
||||
|
||||
def test_breakout_cross_long_up():
|
||||
assert roll_breakout_trigger_crossed("long", 99.0, 100.5, 100.0) is True
|
||||
assert roll_breakout_trigger_crossed("long", 99.0, 100.0, 100.0) is False
|
||||
assert roll_breakout_invalidate("long", 98.0, 99.0) is True
|
||||
assert roll_fib_invalidate("long", 110.0, 105.0, 95.0) is True
|
||||
|
||||
|
||||
def test_breakout_short_below_breakthrough():
|
||||
assert roll_breakout_trigger_crossed("short", 81.0, 80.57, 80.65) is True
|
||||
assert roll_breakout_trigger_crossed("short", 80.64, 80.57, 80.65) is True
|
||||
assert roll_breakout_trigger_crossed("short", 80.57, 80.57, 80.65) is True
|
||||
assert roll_breakout_trigger_crossed("short", 81.0, 80.70, 80.65) is False
|
||||
|
||||
|
||||
def test_preview_breakout_mode_label():
|
||||
preview, err = preview_roll(
|
||||
direction="long",
|
||||
|
||||
Reference in New Issue
Block a user