Prefer perpetual symbols and normalize before market.contractSize lookup so Gate BTC float matches ~0.4U not thousands.
Co-authored-by: Cursor <cursoragent@cursor.com>
Compute float_pnl and tp_profit from mark/entry/contracts using each exchange contract size during dashboard enrich.
Co-authored-by: Cursor <cursoragent@cursor.com>
Unify Gate/OKX/Binance: disable the open button with a side note during force-close, cooloff, and daily freeze, and enforce the same gate server-side.
Co-authored-by: Cursor <cursoragent@cursor.com>
Env OKX_TRADE_MODE selects standalone options, perp hedge, or OO hedge; hide the other module UI and use group or position limits per mode.
Co-authored-by: Cursor <cursoragent@cursor.com>
Treat 2:4 as 2 perp + 4 option coins instead of normalizing to 1:2, and disable embed page caching so hub iframe picks up trade UI updates.
Co-authored-by: Cursor <cursoragent@cursor.com>
Group policy selects, SL/RR fields, options, and submit so the unlabeled RR input and scrambled checkbox/price row no longer fight for space.
Co-authored-by: Cursor <cursoragent@cursor.com>
RISK_DAILY_LOSS_LIMIT (default 2, 0 disables) freezes new opens after N losing closes in the trading day.
Co-authored-by: Cursor <cursoragent@cursor.com>
Selecting 指定币数量 opens an order dialog; pending orders move into a 当前委托 tab after 当前持仓; harden remark autofill that showed dekun.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add a dedicated lightbox above the review dialog and raise global imgModal z-index so enlargements are no longer hidden behind it.
Co-authored-by: Cursor <cursoragent@cursor.com>
API enriches entry/SL/TP with price_to_precision display strings; OKX formatter now uses the same path as Gate/Binance.
Co-authored-by: Cursor <cursoragent@cursor.com>
Exclude journal-form from InstanceEmbed submit reload, stopImmediatePropagation on AJAX save, and force-reload trades when the table is stuck on loading.
Co-authored-by: Cursor <cursoragent@cursor.com>
Delegate submit handling for late-mounted #journal-form across OKX/Binance/Gate, avoid full reload fallback, and soft-refresh trade rows after save.
Co-authored-by: Cursor <cursoragent@cursor.com>
Defer exchange chart generation to a background thread and save via XHR so fill-from-trade no longer blocks on full page reload.
Co-authored-by: Cursor <cursoragent@cursor.com>
Background poll builds a memory snapshot; the page reads snapshot and refreshes on SSE instead of hitting heavy exchange APIs on each load.
Co-authored-by: Cursor <cursoragent@cursor.com>
POST /ai_daily_review was returning 504 while the model was still running; patch BT reverse-proxy read/send timeouts to 360s on deploy.
Co-authored-by: Cursor <cursoragent@cursor.com>