Commit Graph

492 Commits

Author SHA1 Message Date
dekun d467760d5c 顺势加仓 v2:程序监控滚仓、文档页与平仓同步
重写滚仓计仓与四种加仓方式(市价/斐波/突破),程序盯 mark 触价成交;风险读监控单;pending 可删不可改;手动平仓同步结束滚仓。新增 /strategy/roll/docs 说明页与顺势加仓滚仓说明.md。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 22:03:23 +08:00
dekun 4aebe70611 Fix hub market chart live K-line updates in manual follow mode.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 19:41:17 +08:00
dekun ee011800e1 Open instance in new tab as full page, not embed shell.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 22:47:02 +08:00
dekun 5cf88818c1 Open instance in new tab; add in-hub trade, monitor, and review shortcuts.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 22:37:54 +08:00
dekun 448e88ec55 Count instance win rate by positive PnL and show external closes as manual close.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 22:27:52 +08:00
dekun 0a20ee7eec Show estimated risk, profit, and RR below manual order form.
Add a preview bar under the live order form with risk in red and profit in green; extend preview logic for all SL/TP modes across embed and standalone instances.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 19:19:32 +08:00
dekun cfc703ae5b Fix double POST on open position in embed shell mode.
Embed capture-phase form handler and allowManualOrderSubmit both submitted /add_order; skip custom forms and use a single fetch reload path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 19:03:25 +08:00
dekun 2dadd93d91 Fix embed date filter reload and classify profitable stops as trailing TP.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 11:27:42 +08:00
dekun 924a385d6c Fix plan history detail modal unreadable text over stats table.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 11:17:31 +08:00
dekun 61d79c4de1 Fix hub market chart live K-line updates without manual reload.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 14:48:01 +08:00
dekun 6ffae02d30 Allow roll add-ons while position-limit freeze is active.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 02:08:44 +08:00
dekun 9d1986d771 Exclude trend and roll monitors from position-limit freeze count.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 02:04:09 +08:00
dekun 322060de31 Show position-limit freeze on hub and instance risk badges.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 01:58:24 +08:00
dekun 3e8ecbf712 Add refresh buttons to hub plan and calculator pages.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 01:43:27 +08:00
dekun 384d404bb3 Slim embed tab rendering to cut memory use and restore calculator.
Load only per-tab data for embed fragments, skip exchange capital fetches on tab switches, and harden calculator market imports/timeouts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 01:33:42 +08:00
dekun bced61b9d7 Avoid hub iframe overlay on embed shell tab switches.
Use in-shell content loading state instead of parent postMessage so tab changes do not trigger the full instance-frame loading mask.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 01:23:40 +08:00
dekun 4ad335ca84 Add hub iframe embed shell with tab fragment API.
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>
2026-06-24 01:13:34 +08:00
dekun 157d9ada21 Fix calculator import error for hub_supervisor_lib.
Ensure settings_store resolves supervisor module when imported from repo-root calculator libs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 00:42:21 +08:00
dekun 813ebf0e4e Skip exchange PnL sync on hub iframe soft nav to fix slow records tab.
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>
2026-06-24 00:39:54 +08:00
dekun b18b2143b5 Restore hub iframe soft nav to cut blank tab switch gap.
Use fetch in-frame navigation with overlay and hover prefetch; show delayed hub loading spinner instead of hiding the iframe.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 00:32:03 +08:00
dekun f63f8810e6 Fix Gate/Binance memory regression and roll stop offset from avg.
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>
2026-06-24 00:21:07 +08:00
dekun 7f8ae97a98 Fix hub iframe nav flicker with normal navigation and loading overlay
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 00:06:17 +08:00
dekun e3559531d9 Revert instance soft nav cache to fix navigation flicker
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 23:59:27 +08:00
dekun 016c93faf2 Add 7-day local page cache for instant instance nav switching
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 23:52:28 +08:00
dekun e03863d780 Add roll leg avg/TP profit display and reduce instance nav flicker
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 23:42:02 +08:00
dekun 54ba412d1d Fix false supervisor open events for existing holdings
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 20:20:33 +08:00
dekun 65901c5577 Fix supervisor AI empty replies with fallback templates
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>
2026-06-23 20:10:33 +08:00
dekun acc158f85d Use auto-fit grid for funds and dashboard account cards
Account cards expand to fill available width when fewer exchanges are enabled instead of staying in fixed four-column tracks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:57:24 +08:00
dekun ea5c6cddb4 Add per-card save and collapse on settings page
Each settings section and exchange card gets its own save button and fold toggle with state persisted in localStorage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:37:16 +08:00
dekun 0dedaa2b4d Fix supervisor settings panel inner padding
Align the trading supervision card with other settings panels so content is not flush against the border.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:30:14 +08:00
dekun bfbd6879d6 Add AI trading supervisor with WeChat push and daily session
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>
2026-06-23 19:25:01 +08:00
dekun d3d366d0ee Hide disabled exchanges from dashboard and fund overview.
Only aggregate and display exchanges with enabled monitoring in system settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:41:52 +08:00
dekun faa41eece1 Make calculator cards equal height on desktop layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:34:15 +08:00
dekun f4d7dec111 Trim trailing zeros in calculator market info display.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:29:08 +08:00
dekun b0ec291345 Replace httpx with urllib in calculator market fetch.
Avoid ModuleNotFoundError when hub_calculator_market_lib loads outside the manual-trading-hub venv.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:20:51 +08:00
dekun f78ea1288e Fix calculator instance auth header to X-Hub-Token.
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>
2026-06-23 18:17:42 +08:00
dekun 5e507d0b66 Use hub exchange instances for calculator contract precision.
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>
2026-06-23 18:13:02 +08:00
dekun d938bc6c59 Redesign roll calculator with auto first entry and chained add legs.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:44:27 +08:00
dekun 253d353206 Add hub strategy calculator page with trend and roll risk-based sizing.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:35:06 +08:00
dekun 1ba0014fff Add padding to macro settings panel so text is not flush to edges.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:24:07 +08:00
dekun caf4996159 Add settings toggles for plan, archive, and AI coach nav items.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:19:12 +08:00
dekun 89909c64a3 Align trade record detail fields with label-value grid layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:04:50 +08:00
dekun 21f86906da Fix mobile trade records hidden by CSS cascade overriding compact list.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 16:58:56 +08:00
dekun c302c3e4ea Add mobile compact trade and journal lists with tap-to-expand detail.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 16:53:56 +08:00
dekun 8e810154ca Add open-instance to trade page and mobile/tablet responsive layouts.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 16:38:30 +08:00
dekun ed3709dddf Move entry scheme to active plans only, required on archive.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 16:56:34 +08:00
dekun a837cfd14c Fix broken hub_macro_calendar_lib import in hub.py.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 16:50:09 +08:00
dekun 091317276d Add entry plan page with CRUD, archive flow, and win-rate stats.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 16:19:56 +08:00
dekun bd759c42d6 Use lightweight ticker APIs for liquidity rank to cut memory.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 09:24:27 +08:00
dekun c0f3606ecc Add win rate and profit-loss ratio to archive stats.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 09:13:37 +08:00