Replace full-page soft nav with a persistent shell and /api/embed/page loads so tab switches in the hub iframe avoid document.write flicker.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove hover prefetch and mark soft-nav fetches so Gate/OKX render pages from local DB without blocking on exchange history sync.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop fetch_tickers fallback for volume rank and keep stale cache on failed refresh. Compute roll unified stop as merge-average plus offset percent instead of break-even.
Co-authored-by: Cursor <cursoragent@cursor.com>
Skip appending AI error strings to the session and use event-specific fallback commentary when the model returns empty content.
Co-authored-by: Cursor <cursoragent@cursor.com>
Proactive monitoring for manual/hub closes and new opens prevents overtrading via in-app alerts, configurable WeChat links, and supervisor chat.
Co-authored-by: Cursor <cursoragent@cursor.com>
Market info fetch was rejected by instances because it sent the wrong bridge token header; align with hub monitor calls.
Co-authored-by: Cursor <cursoragent@cursor.com>
Load enabled instances from settings, fetch market info via /api/hub/market, and apply exchange-specific amount and price precision in trend and roll calculators.
Co-authored-by: Cursor <cursoragent@cursor.com>
Merge 关键阻力位/关键支撑位 into 关键支撑阻力, share key_monitor_form.js across hub and new-tab views, and add hub shortcut to /key_monitor.
Co-authored-by: Cursor <cursoragent@cursor.com>
Clear expired cooloff on read, never restart timer from invalid future anchors, and reconcile with journaled manual closes when the 1h window already ended.
Co-authored-by: Cursor <cursoragent@cursor.com>
Clamp future last_close anchors, cap remaining time server-side, prefer freeze_remaining_sec in the badge JS, and auto-repair stale DB rows on read.
Co-authored-by: Cursor <cursoragent@cursor.com>
Anchor last_close on journal save, ignore leftover stored until when 1h window ended, and clear expired cooloff on trading-day rollover.
Co-authored-by: Cursor <cursoragent@cursor.com>
Treat naive app datetimes as local time, normalize legacy UTC-ms rows, and resolve cooloff end from stored until or last_close+duration.
Co-authored-by: Cursor <cursoragent@cursor.com>
Allow 1h reduction for any active 4h-tier cooloff, hook trade record review updates, and fix freeze label thresholds.
Co-authored-by: Cursor <cursoragent@cursor.com>
Hub closes and late journal saves now shorten active manual cooloffs when exit trigger and note are filled in.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove external-close risk hooks; register user_instance, user_hub, and user_trend_stop via hub API and trend stop; update docs and tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Implements shared account_risk_lib with 4h/1h cooloff and daily freeze rules, wires hooks into all four exchange apps and hub monitor UI, with tests and docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add shared manual_order_rr_preview.js to fetch order_defaults after symbol and TP/SL inputs complete, display estimated profit-loss ratio before submit in price and percentage modes (and fixed RR), unified for risk and full-margin sizing.
Co-authored-by: Cursor <cursoragent@cursor.com>
Force exchange_key on archive sync; add contract column and tag select styles on inner-light-mind; serve time_close_ui.js on instances so order/key time-close duration can be selected.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
Add HUB_FUND_HISTORY_START_DAY so curves and drawdown exclude snapshots before the baseline trading day.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add /funds page for total and per-account balance (funding+trading), drawdown, and daily snapshots from monitor board aggregation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sync order monitors from Gate position history after hub flat close. Store and display initial_stop_loss in trade records instead of post-amend exchange stops.
Co-authored-by: Cursor <cursoragent@cursor.com>
Enforce optional DAILY_OPEN_HARD_LIMIT in precheck_risk and can_trade, keep AI alerts at DAILY_OPEN_ALERT_THRESHOLD, and document env setup for all four instances.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use exchange TP/SL for display and DB sync on price_snapshot polls, refresh instance UI cells on each tick, and merge live values into hub monitor board.
Co-authored-by: Cursor <cursoragent@cursor.com>
Place limit orders outside key levels with fixed SL and 1.5 RR, 24h expiry, separate stats, and full-margin mode guard.
Co-authored-by: Cursor <cursoragent@cursor.com>