## 菜单 - 币种管理 - 增改查禁用删 - 交易所账户管理 - 订单管理 - 策略管理 - 加载,更新,平仓 - (管理员)权限管理 - (管理员)用户管理 1.看盘功能 - 币种管理-添加币种 - 初始化币种,拉取历史k线(1s-3个月),订阅实时k线,补齐停机/网络错误实时曲线缺失(自动检查,存入时检查相邻时间数据) - 币种数据落库, 币种数据缓存 - websocket gateway, grpc stream, 订阅列表(k线/行情/深度)->实时推送前端 2.自定义指标功能 - go plugin - MACD 指标 - 指标订阅列表 grpc stream 3.自定义策略功能 - go plugin - 交易管理-订单 - 平均价交易信号 - 移动止盈止损 - 风险管控 4.策略模拟盘交易观察 - 订阅列表-交易管理 grpc stream 盈亏/持仓量 5.管理系统 6.go plugin 指标库 7.go plugin 策略库 8.ai trade victoriametrics 下单策略(胜率/方向正确率),止损参数 每一单隔离 聚合信号, (BTC, GOLD, Oil...), both kline close - AggregationSignalService - 时间窗口3/5s, 过期无效(监控信号成功率/延迟率) k线推送 - 实时k线 -> 内存聚合 - closed -> cache -> async tsdb -> kline signal - query(监控成功率/缓存命中率) -> cache -> tsdb 价格/交易量精度->tsdb读写存储 kline时间窗口 Dragonfly redis替换 CCXT – [加密货币交易所交易接口库](https://github.com/ccxt/ccxt) [binance交易接口库](https://pkg.go.dev/github.com/adshao/go-binance) ### 绘图框架 tradingview advanced-charts: - https://cn.tradingview.com/advanced-charts/ tradingview lightweight-charts: - https://tradingview.github.io/lightweight-charts/ - https://github.com/tradingview/lightweight-charts - widgets: https://www.tradingview.com/widget-docs/widgets/charts/symbol-overview/ - free: https://www.tradingview.com/free-charting-libraries/ d3js: - https://d3js.org/ night-vision: - [night-vision](https://github.com/project-nv/night-vision) DXcharts: - https://devexperts.com/dxcharts/ - https://github.com/devexperts/dxcharts-lite - https://financefeeds.com/zh-CN/dxcharts-%E5%9B%BE%E8%A1%A8%E7%9A%84%E5%B4%9B%E8%B5%B7%E6%88%90%E4%B8%BA%E4%BA%A4%E6%98%93%E5%B9%B3%E5%8F%B0%E9%87%91%E8%9E%8D%E7%A7%91%E6%8A%80%E7%BD%91%E7%AB%99%E7%9A%84%E7%AB%9E%E4%BA%89%E4%BC%98%E5%8A%BF/ golang-clash: - https://hub.docker.com/r/dreamacro/clash strategy0: 趋势追踪,增长趋势, 1. 寻找历史极值点(n根k线内),差值比例 2. 当前属于波段增长点 3. 买卖点画叉 4. 移动止盈,固定止损,风险评估止损 ### 量化框架参考 [investing-algorithm-framework](https://github.com/coding-kitties/investing-algorithm-framework) 回测信号可视化, /trading/strategySeries 一样从postgres拉信号/订单数据 用户方向(操作体验优化): - 账户净值曲线、总收益曲线 - 月份收益分布柱状图 - 动态策略脚本: - python, pine script - Wasm(WebAssembly), 接口类型WIT - go plugin插件化(指标/策略, 安全问题?), 调度docker容器运行回测, grpc资源访问 - 自定义脚本语言(偏配置内容) -> 编译为 go plugin (安全检查) -> 直接运行 收益方向: - trade strategy - 自动测试(因子挖掘), 因子失效检测: 1. 指标分类 2. 指标参数组合迭代 (确定潜在的可调参数)!!! 3. 绘图能力(plot), 回测能力 KlineSeries 替换, copy性能消耗 macd dif/dea -> state -> plot - 金融市场体系 - 高数 - 交易系统 - VWAP/TWAP: 交易分单算法 减少下单对市场冲击 系统终极形态: - 量化交易 - web3: - 智能合约 solidity NTF generate(metaTradePlan[sig,risk,trade,close params]) -> tradePlan -> backtest -> result -> statistics 趋势方向指标相关性预测,指标有效性评分,前N预测结果 k[0,1,2,3] -> k[-1] RSI[1,2,3,4] -> RSI[0] 计算 -> 评估 -> 确认 小资金入场对市场的影响可忽略,1根k线的成交量(容量) [Alphalens 因子评估库](https://github.com/quantopian/alphalens) [词法解析](https://github.com/alecthomas/participle)