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>
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>
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>
Sync review-mode checkbox with disabled state after form restore; repair initHubEmbedInFrameNav regression in instance_theme.js.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use soft in-frame navigation and loading overlay in hub instance shell; pass embed=1 for iframe SSO opens.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove username_hint from hub auth status API and disable autocomplete on hub and instance login forms.
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>
manual_order_rr_preview.js was not routed from repo static/, so hide logic never ran. Add Flask routes on four exchanges, default hidden in HTML, and toggleSltpMode visibility.
Co-authored-by: Cursor <cursoragent@cursor.com>
False external-close sync could match historical closing trades before opened_at, producing stop-loss results with closed_at earlier than opened_at. Only use fills at or after open time.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add startup grace and consecutive flat polls before external-close reconcile, matching Gate, to avoid stopping monitors and canceling TP/SL when positions API is not ready after restart.
Co-authored-by: Cursor <cursoragent@cursor.com>
Only price and percentage modes show estimated profit-loss ratio before open; fixed RR mode keeps the existing estimated take-profit display.
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>
Sort inner-archive daily trades by closed_at_ms; add open time and live hold duration to instance and hub position cards, with exchange margin on hub footer.
Co-authored-by: Cursor <cursoragent@cursor.com>
Move timed-close badge next to contract name on hub board and instance position cards; refresh countdown on board render.
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>
Program monitors open positions and market-closes at deadline; UI shows label and countdown on instance and hub boards.
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>
Replace the pipe-separated rule blurb with a detailed five-column table driven by .env-backed gate parameters for easier trading reference.
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>
Sync hub shell to visualViewport when the keyboard opens to prevent white screen above chat input. Make instance tabs horizontally scrollable with active tab centered on phone.
Co-authored-by: Cursor <cursoragent@cursor.com>
Mark export bar and summary stat cards as instance-desktop-only. Hide all CSV/MD export actions on phone across four exchange instances.
Co-authored-by: Cursor <cursoragent@cursor.com>
Move hub AI mobile CSS after desktop grid rules so chat fills the screen. Hide exchange and total-trade stat cards on phone across all instances and compact export bar.
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>
Records were still in the database but CSS clipping hid row text; restore visible summary styling and symbol fallback from snapshots.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add 15-day fund snapshot store and /api/hub/account on all instances
- Summary includes yesterday/today trades, fund columns, and section 5 操作建议
- Chat context distinguishes empty positions from local monitors
- Support image/document attachments in AI chat
Co-authored-by: Cursor <cursoragent@cursor.com>