Commit Graph

117 Commits

Author SHA1 Message Date
dekun fa59fc1273 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>
2026-06-11 08:22:41 +08:00
dekun 3bdf7cf384 fix: show box/convergence breakout labels in key level trade records
Persist 箱体突破/收敛突破 as key_signal_type and backfill historical records on startup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 08:11:57 +08:00
dekun f6e3d54d29 revert: restore original order monitor form layout with SL/TP mode width fix
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 08:01:06 +08:00
dekun 91c8cd8c2a fix: redesign order monitor open form for clearer SL/TP inputs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 07:56:55 +08:00
dekun 9c7290dea5 feat: add tabular key monitor rule reference on all exchanges
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>
2026-06-10 18:40:36 +08:00
dekun 59a45ed027 fix: Gate hub close sync and trade record open stop-loss snapshot
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>
2026-06-09 18:01:59 +08:00
dekun 02d2a6c70b fix: mobile hub AI keyboard layout and instance top nav scroll
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>
2026-06-09 17:16:00 +08:00
dekun 9aba8ec645 feat: hide instance export and stats on mobile, desktop-only downloads
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>
2026-06-09 17:07:00 +08:00
dekun e60beeedd3 feat: fix mobile AI full-width layout and simplify instance stats
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>
2026-06-09 16:57:47 +08:00
dekun 3527c26717 feat: collapse trade/strategy rule tips and color-code key history outcomes
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:39:36 +08:00
dekun 4a043e65e3 feat: improve light mode key monitor UI and collapse rule tips by default
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:18:10 +08:00
dekun 260828041f feat: unify key monitor UI with one-line summary and expandable details across all exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 16:11:31 +08:00
dekun 24a86a710c feat: add per-account daily open hard limit across all exchanges
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>
2026-06-09 15:46:18 +08:00
dekun f7d94f67d7 fix: sync live TP/SL to position cards after entrust changes
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>
2026-06-09 11:06:27 +08:00
dekun 7cb55f6557 feat: add false breakout key monitor for BTC/ETH on three exchanges
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>
2026-06-09 10:13:53 +08:00
dekun a5c6e0c5b6 feat: add fixed RR stop-loss mode for manual live orders on all instances
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 20:57:29 +08:00
dekun 89a58c7323 fix: exchange-specific volume rank APIs for OKX and full top20
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 15:53:41 +08:00
dekun 4bf0c2363f feat: daily volume top20 rank per exchange in market page
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 15:46:36 +08:00
dekun ea92160d54 Fix strategy records list showing empty rows after hub close.
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>
2026-06-08 08:51:47 +08:00
dekun 67cc084347 fix(gate): align fund transfer between gate and gate_bot
- Extract shared gate_transfer_lib and global transfer form on all pages

- Block auto-transfer when trend pullback plans have open positions

- Redirect manual transfer back to the current page after submit

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 10:01:32 +08:00
dekun 62e48dab92 feat(hub): enrich AI coach with fund history, closed trades, and chat uploads
- 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>
2026-06-07 08:54:20 +08:00
dekun 674d721072 fix(ui): light-theme contrast for AI daily and weekly review markdown across four exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 14:05:02 +08:00
dekun 3f1bf9905d fix: AI review list UTC filter, vision timeout, and stuck loading state
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:59:17 +08:00
dekun 4ac4c062e0 fix: AI review loading UX and Gate preview snapshot time filter SQL
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:51:16 +08:00
dekun 86a6081090 fix: AI daily review sqlite3.Row crash and error feedback across four exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:39:50 +08:00
dekun 995ee8d2e1 fix: prevent theme flash when navigating instance pages from hub iframe
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:23:51 +08:00
dekun e30d24173f fix(ui): light-theme badges, PnL colors, and journal detail across four exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:16:29 +08:00
dekun 1b51f73ecd fix: journal detail contrast and unify AI review journal format across four exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 13:09:59 +08:00
dekun 934e48b9a8 fix: show risk amount only in full-margin mode across four exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 09:08:45 +08:00
dekun 673bcbdc70 fix: align unrealized PnL across four exchange instances via hub_position_metrics
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 20:25:06 +08:00
dekun 24270944e7 fix(hub,gate): cross-margin TP/SL and dedupe hub conditional orders
Gate hedge position triggers use close=false; stop silent ccxt fallback on cross margin. Hub merges agent and Flask TP/SL by trigger price and labels Gate orders correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 19:48:04 +08:00
dekun 93e148a3e7 fix: unify order/key focus K-line theme, PnL, RR and exchange price tick
Share focus_chart templates and APIs across four instances; align chart Y-axis, price lines and meta bar with exchange symbol precision and live unrealized PnL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 16:45:51 +08:00
dekun 3b4120a36e fix(instance): light-theme journal AI buttons and mood checkboxes
Fix secondary button contrast, exclude checkboxes from dark input fill, style mood-grid; bump theme assets to v4.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 13:12:44 +08:00
dekun 21b3e97571 fix(instance): light-theme P/L colors, AI review panels, bot stats
Restore plan floating P/L and st-done greens; fix panel-item and stats-split-col in light mode; observe journal lists; bump theme assets to v3.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 13:07:00 +08:00
dekun be3ce18665 style(instance): unify light theme across four exchanges
Extend instance_theme CSS/JS for trade, strategy, records, journal and stats tabs; remap inline dark colors; bump static assets to v2.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 12:59:42 +08:00
dekun d14c629778 feat: add light/dark theme to exchange instances with hub SSO sync
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 12:52:27 +08:00
dekun b394e495ca chore: remove instance Windows scripts and screen/systemd helpers
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 11:56:32 +08:00
dekun 1282293e91 docs: unify Ubuntu root /opt PM2 deployment and refresh README
Add docs/ubuntu-server.md; remove Windows and alternate process managers from deployment guides; index strategy, key monitor, TP/SL, breakeven, and replay docs in root README.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 11:48:54 +08:00
dekun 546bc7bcf1 fix(hub): two-column trend plan card; docs for records and hub layout
Left column shows plan metrics, right column DCA table, footer for breakeven and snapshot info; update strategy and exchange usage docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 10:59:47 +08:00
dekun 3fb2023efb feat: strategy trade snapshots, DCA detail, and hub trend layout
Persist ended trend pullback and roll group snapshots to a unified records page; show replenishment tiers on instance and hub cards with horizontal single-position layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 10:45:27 +08:00
dekun 1a6b5f55a1 fix: regenerate clean app icons with Pillow (fix corrupted favicon)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 10:22:08 +08:00
dekun e03cce20d6 feat: add brand icons for Chrome shortcuts and PWA manifest
Dark cyan-green candlestick icon for hub and four exchanges; generate/sync scripts and docs/shortcut-icon.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 10:17:22 +08:00
dekun 29b0634c6d feat: bidirectional daily auto-transfer with position skip
Rebalance swap to AUTO_TRANSFER_AMOUNT at Beijing hour: top up from funding or sweep excess back. Skip and WeChat notify when active positions exist.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 09:57:25 +08:00
dekun f7bac11694 feat: add full-margin position sizing mode across four exchanges
Env POSITION_SIZING_MODE switches risk vs full-margin (available*buffer, BTC/ETH 10x). Blocks trend/roll/key auto opens in full margin, purges breakout/fib monitors with WeChat notice, keeps RR check and initial SL snapshot for records.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 08:24:35 +08:00
dekun d75527a9ca docs(env): unify auto-transfer config across four exchanges
Align .env.example blocks and add sync script to merge AUTO_TRANSFER_* into existing instance .env files without touching API secrets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 07:47:18 +08:00
dekun 1b3f661bad fix: label trend breakeven handoff as 趋势回调 across four exchanges
Set order monitor and trade record source to trend pullback after handoff; unify hub and instance display; add migration script for legacy rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 06:30:14 +08:00
dekun d07357b98e fix(hub): merge mark price from Flask snapshot and fix board refresh
Sync hub positions with instance price_snapshot (order_prices and position_marks).
Fix monitor board UI when hub restarts (version rewind) and queue snapshot fetches.
Expose board aggregate status on /api/ping for diagnostics.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 22:44:01 +08:00
dekun e2bf58cfd3 feat(trend): 趋势回调保本移交下单监控并统一写交易记录
保本后结束趋势计划,持仓转入下单监控(备注趋势回调),交易所同时挂保本止损与计划止盈;中控或交易所平仓均经下单监控写入交易记录(trend_plan_id、开仓类型),四所共用 strategy_trend_register。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 17:01:34 +08:00
dekun cf3e2ee1c9 feat: 持仓快照盈亏比与交易所止损已保本标识
盈亏比固定用开仓 initial_stop_loss 计算,人工改委托后不变化;轮询交易所止损触发价相对成交价判定已保本,四所实例与中控统一显示绿色标识。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 16:31:03 +08:00
dekun ba681c7a58 中控行情区与 K 线本地库(15 天滚动、按需拉取)
新增行情区单图与周期切换,K 线优先读 hub_kline.db,不足时经各实例 /api/hub/ohlcv 补齐;无后台定时更新。含回滚标签说明与单元测试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 10:58:59 +08:00