fix: show limit-order gate for false breakout monitors
False breakout used box/convergence volume/break gates in the UI; now shows pending limit order status like fib monitors. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,7 @@ from datetime import datetime, timedelta
|
||||
from false_breakout_key_monitor_lib import (
|
||||
FALSE_BREAKOUT_MONITOR_TYPE,
|
||||
calc_false_breakout_plan,
|
||||
false_breakout_gate_preview,
|
||||
is_false_breakout_expired,
|
||||
key_price_from_row,
|
||||
normalize_false_breakout_symbol,
|
||||
@@ -56,6 +57,20 @@ class FalseBreakoutKeyMonitorLibTests(unittest.TestCase):
|
||||
def test_monitor_type_constant(self):
|
||||
self.assertEqual(FALSE_BREAKOUT_MONITOR_TYPE, "假突破")
|
||||
|
||||
def test_gate_preview_not_box_gate(self):
|
||||
now = datetime(2026, 6, 7, 12, 0, 0)
|
||||
prev = false_breakout_gate_preview(
|
||||
entry_display="1635.0",
|
||||
limit_order_id="oid-1",
|
||||
created_at="2026-06-07 10:00:00",
|
||||
now=now,
|
||||
)
|
||||
self.assertIn("假突破", prev["summary"])
|
||||
self.assertIn("等待成交", prev["summary"])
|
||||
self.assertNotIn("量:", prev["summary"])
|
||||
self.assertIn("限价单:oid-1", prev["metrics"])
|
||||
self.assertTrue(prev["gate_ok"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user