Fix position cards, breakeven badge, and tablet equal-height layout.
Stop clipping pos cards and match trailing-BE stop detection for the badge. On tablet, align order and live-trading panels to equal height with internal scroll; keep desktop positions scrollable after three cards. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+6
-1
@@ -186,8 +186,13 @@ def install_trading(app, *, login_required, require_nav, get_db, get_setting, se
|
||||
if entry_f <= 0:
|
||||
return False
|
||||
tick = float(tick_size or 0) or max(abs(entry_f) * 1e-6, 0.01)
|
||||
buf = tick * max(2, get_trailing_be_tick_buffer(get_setting))
|
||||
be_mult = max(1, get_trailing_be_tick_buffer(get_setting))
|
||||
d = (direction or "long").strip().lower()
|
||||
expected_be = entry_f + be_mult * tick if d == "long" else entry_f - be_mult * tick
|
||||
tol = be_mult * tick + tick * 0.05
|
||||
if abs(sl_f - expected_be) <= tol:
|
||||
return True
|
||||
buf = tick * max(2, be_mult)
|
||||
near = abs(sl_f - entry_f) <= buf + tick
|
||||
if d == "long":
|
||||
return near and sl_f >= entry_f - tick * 0.05
|
||||
|
||||
Reference in New Issue
Block a user