Commit Graph

29 Commits

Author SHA1 Message Date
dekun 1b3a7f1bdc Fix position flicker, drop futures cooloff, prioritize startup display.
Preserve trading state when CTP memory is empty, bootstrap equity/positions on page load, stabilize risk status from DB monitors, and remove app-layer manual close cooling periods.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 23:17:18 +08:00
dekun 8b4b1a875c Fix composite margin ratio cap at 50% and add risk guide page with nav toggle.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 22:29:13 +08:00
dekun 9a10ac8a51 Improve dashboard risk card styling, colors, and add risk control docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 22:14:11 +08:00
dekun b02c9d6ca0 Fix empty recommend list and CTP premarket auto-connect.
Correct main_code order in product refresh, refresh on CTP connect, and limit reconnect to trading or premarket windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 08:24:10 +08:00
dekun 169136dd4a Add modular docs with index, WeChat templates, and AI guide.
Document per-module order logic, risk rules, and WeChat message templates with a central INDEX for navigation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 10:49:10 +08:00
dekun 840e88daad Add key-level auto trade, AI analysis, and trading UX improvements.
Key monitors use 5m close triggers with WeChat alerts and box/convergence auto orders; add pending-order worker, structured WeChat notify, AI settings/messages, session clock, CTP margin sizing, and dual-layer position limits.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 10:36:56 +08:00
dekun 0109b59f27 Use 100k equity for recommend list when CTP is offline.
When SimNow or live CTP is disconnected, the tradable-products section shows four whitelisted symbols and calculates max lots from a fixed 100,000 capital instead of reference capital in settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 09:16:22 +08:00
dekun e18d5feb72 Apply 200k scope when CTP offline; trailing breakeven order UX.
When SimNow or live CTP is disconnected, default to the four-product whitelist regardless of reference capital. Trailing breakeven defaults off; when enabled hide take-profit and risk-reward, monitor exits via trailing stop only. Document both behaviors in TRADING.md and FEATURES.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 23:57:11 +08:00
dekun 382a9a0e14 Use Sina-only market K-lines and editable admin login synced to .env.
Market page uses Sina for quotes and bars with an auto-follow toggle and incremental chart updates while panning. Settings lets users change username and password, persisting to the database and .env.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 13:53:12 +08:00
dekun 98239d29c1 Add automatic database backup with download and restore docs.
Back up futures.db and uploads to /root/qihuo_backup on a daily schedule, expose backup downloads in settings, and document cross-server restore.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 13:04:48 +08:00
dekun 42f2dad52a Remove contract profile from navigation and retire its routes.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 03:32:30 +08:00
dekun 4eb5709d71 Rebrand product and enhance tradable symbols table with spec columns and K-line links.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 03:18:42 +08:00
dekun ab9987e4c7 Add personal license agreement and rename product section to tradable symbols.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 02:52:45 +08:00
dekun 7b60f0dce5 Update documentation to match current product features.
Rewrite module docs for order monitor, CTP sync, and stats; remove obsolete simulated-position and UI descriptions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 02:08:01 +08:00
dekun 4aebc2df49 fix: SimNow 登录封禁(错误75)时冷却退避,停止自动重连
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 16:50:09 +08:00
dekun 5a6c89c662 feat: CTP/SimNow 配置迁入系统设置,登录失败即时报错
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 16:46:01 +08:00
dekun 72361233a0 fix: CTP重连前探测前置可达性,失败时关闭网关并明确报错
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 16:30:35 +08:00
dekun 528d9811e3 feat: 导航开关与 CTP 柜台手续费
系统设置可开关五类导航;手续费默认从 CTP 查询同步,本地/AKShare 作离线兜底;补充 FEES.md。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 12:19:56 +08:00
dekun ca894dfd4d deploy: 一键部署内置 locale/时区/SimNow 前置探测与 CTP 验证
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:59:02 +08:00
dekun 36e26973fb fix: CTP 需 zh_CN.GB18030 中文 locale 而非仅 UTF-8
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:42:15 +08:00
dekun d368317c1b fix: 强制设置有效 locale 修复 vnpy_ctp CTP 登录崩溃
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:38:19 +08:00
dekun f73d436077 fix: CTP 连接后 locale 崩溃,PM2 设置 LANG=C.UTF-8
vnpy_ctp C++ 扩展在缺 locale 时会 terminate;补充 SimNow 备用前置说明。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:32:20 +08:00
dekun 350d0fed6b docs: TRADING 增加 SimNow 注册文档链接
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:22:44 +08:00
dekun 28d6ae52b2 fix: CTP 连接捕获 SimNow 真实报错并增加诊断脚本
显式设置柜台环境=实盘;连接失败时解析 4097/登录拒单;scripts/test_simnow.py 供服务器排查。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:20:30 +08:00
dekun 8726760b12 fix: deploy 安装 pkg-config 以编译 vnpy_ctp
Meson 需 pkg-config 查找 python3-dev;deploy.sh 保留已有 venv 并验证 vnpy_ctp 导入。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 10:56:39 +08:00
dekun 62cd868f79 完善下单表单与 CTP 持仓,requirements 加入 vnpy 并更新部署文档
以损定仓/固定张数分栏下单、限价市价、持仓仅读柜台;DEPLOY 补充 SimNow 与 vnpy 安装说明。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 10:52:25 +08:00
dekun 6e423eebfb 接入 SimNow 模拟盘与期货下单、策略及品种推荐功能。
新增 vnpy CTP 桥接、以损定仓/固定张数、趋势回调与滚仓策略、按资金推荐品种及交易风控;模拟盘走 SimNow,实盘预留期货公司配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 10:04:37 +08:00
dekun b77f30b3ff 新增品种简介查询页,支持东方财富/新浪合约规格展示
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 15:54:38 +08:00
dekun 613b88f2d3 补充功能说明与独立部署文档,精简 README 为文档入口
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 15:30:34 +08:00