Commit Graph
338 Commits
Author SHA1 Message Date
jackyu66gitandCursor 32c18f0201 research: 1m 出场口径重定、费率修正,与影子测量的判据常数
起因是用户看图指出「止盈没做好」,查下来 TP=3.0 确实把右尾截早了,
而且 1m 不该沿用 5m/15m/30m 的参数——成本固定在 bp、目标随 ATR 缩放,
1m 的 3 ATR 只有 0.39% 而 30m 是 1.87%,成本占比差 5 倍。

step41(5m/15m/30m)与 step42(1m)跑同一张全网格:
SL × TP × MAX_BARS × 分批(3 ATR 减半 → 剩余目标 × 剩余半仓止损位)。

- 1m 最优 SL2 / 3ATR 减半 / 剩余止损保持 2.0 / 目标 8ATR / 48 根,
  样本外 8/8 币、7/7 年全面提升,均R/R夏普/回撤/剔10%PF 四项全赢
- 分批要做,但**减仓后不要动止损**。止损位 0/0.5/1/1.5/2 ATR 严格单调,
  越紧越差,三组初始 SL 全一致。保本损是全表最差的一档
- SL=1.0 在 1m 上是废的:剔10%PF 0.78~0.99、中位收益 −0.122%

费率此前写的 taker 3bp / maker 1bp 隐含「原始 taker 6bp」的错误前提,
实际是原始 taker 0.040% / maker 0.016%、返 50% 后 2.0 / 0.8bp。方向是保守的,
所以首轮跑出来的数字全部偏低。exit_model 已改,费率只在分析阶段套用,
不必重跑模拟。改完 1m 的均R +8%,5m/15m/30m 只动 2%——费率只对 1m 有杠杆。

顺带查证了用户的一个假设:余量逐年递减是不是跟波动率有关。成立,而且
r = +0.989。毛/ATR 七年在 2.26~2.67 之间没有趋势,衰减的是 ATR 本身
(2021 的 22.1bp 压到 2026 的 8.8bp)。**是波动率压缩,不是 alpha 衰减。**

由此引出 ATR 门控:低 ATR 桶的毛 R 其实最高(1.16 vs 高 ATR 桶的 0.94),
断崖只在扣费之后出现。所以阈值是**费率的函数**(约 5 + 1.1×taker费),
不是市场常数。当前费率下 ≥8bp,在 5m/15m/30m 上几乎不触发,可作全局规则。

lib/shadow_budget.py 放影子测量要对照的常数:逐币预算、门控阈值、
腿→maker/taker 映射、lag 阈值、判据。记录与报表归 research/live/,
分工的理由是这些数会变——今天预算就动了四次。

out/*.feather 转为 ignore:70MB+ 且重跑可得,摘要都在 HANDOFF。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 00:05:56 +08:00
jackyu66gitandCursor 9b72173285 feat: 第四类买卖点(B4/S4)融入缠论引擎与 web 展示
研究侧的 fast_bsp3 一直只活在 research/lib/ 里,web 端看不到,回测与目视
两条线对不上。这次把它搬进引擎,作为独立的第四类买卖点。

之所以单独立类而不是当作 B3/S3 的低滞后版:step30/31 显示引擎原生的
B3/S3 统计上呈逆势、显著亏损(胜率 27.4%、PF 0.66、t −18.76),而同一组
过滤器把 B4 从 PF 1.59 提到 2.26 却对它无效(0.66→0.71)。两者选的是
不同的交易群体,不是同一信号的早晚两版。

- chanlun/analysis/fast_bsp.py 原样搬入 find_fast_bsp3 与 build_htf_zones,
  另加 add_zone_ladder / htf_fx_timeline / attach_htf_agree
- research/lib/ 两个模块改为转发,所有 step 脚本导入不变,信号逐条比对一致
- 大级别上下文用 resample 从同一份 df 构建,不额外拉数据,因此与界面上选的
  周期和时间范围无关
- 前端三个复选框 + 过滤模式下拉;未过滤的原始信号用浅色,避免与主口径混淆

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 00:05:26 +08:00
UbuntuandCursor 7e339d2a54 research: 影子交易器落在 Hummingbot 上,并修掉 Bitget 连接器的换根延迟
1m 腿的滑点余量只有几个 bp,所以要测的必须是生产路径的滑点——换个运行时
测出来的数就不作数。框架因此从「滑点已知后再定」提前到测量阶段就定为
Hummingbot(Spot/Perp 连接器均 v2.0,Bitget 是 Foundation Partner)。

新增 research/live/。前置测量:

- bench_compute.py 本机算力,1m 单币 0.318s、三币串行 1.38s
- venue_parity.py Binance 与 Bitget 同根信号重合仅 14.6~42.6%
- signal_sensitivity.py 0.25bp 扰动就换掉一半信号
- aggregate_robustness.py 但总体期望不降——脆的是信号身份,不是 alpha
- bitget_baseline.py 因此改用 Bitget 原生基线定预算:余量 BTC -0.13bp、
  ETH +4.02bp、SOL +2.92bp。BTC 本就为负,只作延迟测量的参照物

运行时选型:

- parity_env.py 容器与本机信号逐一相同(下标、中枢数、checksum 全等),
  容器内 0.26s/币反而更快。故 chanlun 直接挂载进容器,不必另起信号服务。
  装进现有 .venv 那条路走不通:Hummingbot 要 numba>=0.61.2 与
  aiohttp<3.14,与本机 Python 3.14 冲突
- latency_ccxt.py / latency_hummingbot.py / latency_compare.py 初测显示
  Hummingbot 比 ccxt.pro 慢约 1030ms,90 根逐根配对里 80~97% 更慢
- probe_ws_action.py 否掉「丢弃 snapshot」的猜测:换根首条就是 update
- probe_hb_vs_raw.py 与 latency_attribute.py 四路归因——容器网络 2~18ms、
  Hummingbot 处理 -10~-30ms,1350~1480ms 全落在解析方式上
- probe_ws_payload.py 定位根因:Bitget 换根会推一条带两根的消息
  [上一根, 新一根],而上游取 data["data"][0] 拿到的是上一根,新一根要等
  下一条单元素消息

修复:

- patched_candles.py 处理消息里的全部元素。不能简单改成 [-1]——那样上一根
  的收盘价会永远停在换根前约 1 秒的那次推送上,而信号对 0.25bp 都敏感
- verify_patch.py 60 根配对验证:拿回 1060~1090ms,与原始 WS 只差 5~14ms
  已贴理论下限,19 根已收盘 K 线 OHLCV 逐根未变。折算 ETH 省 0.54bp、
  SOL 省 0.42bp。此 bug 值得向上游反馈

影子交易器:

- shadow_hb.py 不下单,读连接器真实盘口按仓位吃单深度算成交价,与次根开盘价
  (回测 entry_delay=1 的口径)相减,分解成延迟漂移、盘口价差、深度冲击。
  盘口 10Hz 滚动缓冲 30 秒,把延迟变成自变量:每个信号记 0.5/1/2/5s 与实际
  算完时刻各一个滑点值,本机算得慢也不影响能读出的曲线
- shadow_signal.py 信号计算隔离到子进程。0.26s 是纯 CPU 且 chanlun 受 GIL
  限制,放进 asyncio 循环会把行情处理一起卡住
- shadow_report.py 首日延迟门槛与滑点曲线报表

不用 paper trade 测滑点:它的成交由 Hummingbot 自己的撮合模型模拟,
测出来是模型行为而非市场行为。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 23:51:57 +08:00
jackyu66gitandCursor 66061f79a1 research: 低滞后信号口径定稿与实盘前偏差审计
fast_bsp3 改用 tol=-1 + require_touch=False,信号滞后从 5.8 根降到 2.2 根。
滞后与收益严格单调(年化 370% -> 906%,同一份数据同一套成本),
这是本轮提升的主因,也意味着实盘延迟会直接侵蚀收益。

新增 step31~39 验证策略能否落地:
- 跨品种样本外——8 个未参与调参的币,PF 2.73 / t 28.5,无一为负
- 时点重建——只喂到信号那一根重算,同根命中 100%,确认无未来函数;
  1m 在 2000 根窗口即饱和,计算耗时 0.20s
- 偏差审计——多空对称、中枢生效时刻零回退、滑点稳健至 30bp、持仓几乎不重叠
- 消融——alpha 来自缠论中枢的上下文定位,而非「收盘转强」这个触发动作

补 research/HANDOFF.md:记录确切口径与参数、已排除的偏差、
已验证无效因而不必重做的方向,以及下一步用影子交易器实测执行滑点的方案。

清理 step1~20 的输出:早期方法论已被推翻(存在未来函数偏差),
其结论不再被引用;脚本保留,需要时可重跑。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 17:47:41 +08:00
UbuntuandCursor b286cb0137 chore: 忽略 Office 文档与虚拟环境目录
手续费.xlsx 一类文件放在仓库旁但不属于仓库;~$ 开头的是 Excel 打开工作簿
时生成的锁文件,每次都会重新出现并占据 git status。

.venv 一并声明:venv 自 3.11 起会在它创建的目录内写 .gitignore,但仅覆盖
该目录,换个位置或用旧版本就失效。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 02:08:12 +08:00
UbuntuandCursor a243edd2d3 docs: 补依赖清单与 README
此前仓库无任何依赖声明。按 AST 扫描全部 import 后按用途切分:
requirements.txt 为核心运行时 8 个包,requirements-dev.txt 追加测试与
research/ 所需。

matplotlib / mplfinance / xgboost / scikit-learn 只出现在 ChanPY.py、
ChanLun_Classifier.py、Find_Trend.py、ChanHeng.py 这四个零引用文件中,
故不纳入清单;ChanPY.py 依赖的外部 chan.py 库本就未安装。

README 记录目录结构、启动方式、库用法、分析流程九步与数据约定,并注明
三处现存问题:web/DEPLOY_GUIDE.md 引用的 6 个部署脚本已在 7f393b9 删除、
web/README.txt 指向不存在的 web/requirements.txt、systemd unit 的端口
8123 与 config.py 默认的 8128 不一致且 gunicorn 未声明。

清单已在全新空 venv 中验证:仅装 requirements.txt 时 57 个模块可导入、
Flask 16 条路由正常;装 dev 清单后测试 24 通过。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 02:01:53 +08:00
UbuntuandCursor 206b27fe72 refactor: 以自实现指标替换 talib 与 technical 依赖
chanlun/indicators/ta.py 接口兼容 talib.abstract,实现代码实际用到的
SMA/MA/EMA/RSI/ATR/MACD/BBANDS;chanlun/pipeline/resample.py 替代
technical.util.resample_to_interval。调用点只改 import,逻辑未动。

暖机长度与平滑种子按 TA-Lib 的约定实现,差一根 K 线就会让下游所有
笔/线段/中枢整体位移。其中 MACD 需特别处理:TA-Lib 让快慢两条 EMA
在同一根 K 线出首值,因而快线的种子取 x[slow-fast:slow] 的均值,而非
从 fastperiod-1 一路递推——两者在百元价位上相差约 0.17。

BBANDS 是有意的分歧:TA-Lib 用 sumsq/n - mean² 求方差,短窗口远离零
时灾难性抵消(timeperiod=2 误差 8.7e-7),本实现用 rolling std,对 50
位精度基准误差为 0。项目实际使用的周期两者一致到 1e-10。

顺带清理 12 个文件中 16 处从未调用的 talib/technical 导入。

验证:9440 组随机对拨;真实 K 线端到端比对 add_indicators 全部 33 个
指标列,NaN 模式一致、MACD 柱符号 100% 相同;屏蔽两个包后 60 个模块
均可导入。新增 test_ta_compat.py 将输出逐 bar 钉在 TA-Lib 上,但该文件
在 TA-Lib 缺失时静默跳过,改动 ta.py 需在装有 TA-Lib 的环境复跑。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 02:01:43 +08:00
jackyu66gitandCursor 7f393b93ed refactor: 精简仓库为 chanlun 核心与 web 分析,移除威科夫与遗留模块
删除根目录旧 Chan 模块、策略、配置、文档及 wyckoff 相关代码;更新缠论 pipeline 与笔中枢计算;补充 research 研究与 web 测试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 01:05:12 +08:00
jackyu66gitandCursor 5c10e35b76 refactor(web): 移除主图威科夫选项与叠层
去掉区间/阶段/时间/VP 开关、Cycle 摘要面板及绘制逻辑;分析请求默认 include_wyckoff=0。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 01:27:51 +08:00
jackyu66gitandCursor 8c165f11cd fix(web): 未完成笔/线段终点对齐图表最新 K 线
各周期使用对应 kline 数据,终点时间 snap 到 candles,优先使用分析 end_price。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 00:40:41 +08:00
jackyu66gitandCursor 97e77847d0 fix(web): 开关缠论元素保留视窗;分周期 Trend 涨跌配色
本地重绘统一冻结视窗;次/次次周期 Trend 上涨下跌使用独立颜色。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 23:56:55 +08:00
jackyu66gitandCursor 90499533fb fix(web): 分析/自动刷新后保留 K 线视窗位置
拆分手动分析与自动刷新拉数路径;全量重建用 logical 优先恢复视窗,
增量 recent 用 scroll+barDelta;避免 barSpacing 重锚与重复冻结导致往右跳。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 23:38:20 +08:00
jackyu66gitandCursor 8ee11317d3 fix(web): 自动刷新保留 K 线视窗;威科夫与图表增量更新
自动刷新改用 tail update 与 scrollToPosition 恢复视窗,避免 setData 后跳到最右;拆分 chart_tv 模块并扩展 analyze/recent API。同步威科夫分析、pipeline 增量构建及相关策略与配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 22:57:43 +08:00
jackyu66gitandCursor 1e60ab3bfa docs: 补强 ECR-004 CODE_REVIEW 复审记录
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:47:18 +08:00
jackyu66gitandCursor d3188ca83c fix: ECR-004 威科夫区间评分硬化与 VP 绘图减负(已审)
评分选 TR、阶段最小跨度、elements_only 门闩、Top-8 VP;无币种独立参数。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:46:08 +08:00
jackyu66gitandCursor ac6be80278 docs: 开启 ECR-004 威科夫硬化与 VP 减负(Draft)
跟进 ECR-003 Review Findings;待 Approve 后实现。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:35:25 +08:00
jackyu66gitandCursor 081a57a90e feat: ECR-003 主站威科夫分析与图表叠层(已审)
独立 wyckoff 引擎 + 按需 include_wyckoff;主站 Lightweight 绘制区间/阶段/事件/VP。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:33:57 +08:00
jackyu66gitandCursor df27b4dde8 refactor: ECR-002 拆分 runtime 包并加深 analyze 契约(已审)
将 web/services/runtime.py 拆为 runtime/ 子模块并保持门面兼容;补齐 ESS 文档、门面/契约/TF_DF 测试与 CODE_REVIEW Approve。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:15:23 +08:00
jackyu66gitandCursor 9f1e7361b6 fix: 修复主站自动刷新内存泄漏,并完善 chan_tv 图表体验
主站重建前完整 dispose、去掉重复 sync 监听,自动刷新默认增量更新;顺带消除首屏重复 analyze、复用 ChanMACD,以及全版 TV 指标/未完成中枢/布局本地缓存。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 16:09:48 +08:00
jackyu66gitandCursor 6b0f3b5837 release: 发布系统版本 v1.0.0(ECR-001)
落盘 CODE_REVIEW Approve 与 RELEASE_REPORT,标记首个正式 release。

Co-authored-by: Cursor <cursoragent@cursor.com>
v1.0.0
2026-08-05 18:53:04 +08:00
jackyu66gitandCursor 74dec4e50b refactor: 缠论引擎包化与 Web 分层(ECR-001)
将根目录引擎迁入 chanlun/ 并保留兼容 shim;拆分 TF_DF 与 web 服务;
前端模块化;strategies 改用 chanlun 导入;补充 ESS 文档与 golden 回归。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:48:20 +08:00
jackyu66gitandCursor e2e45bc1bc chore: 移除不再使用的 ChanMacro、system、tests。
这些目录已废弃,从仓库中清理。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:11:29 +08:00
jackyu66gitandCursor f2e77e1bdb chore: 将 data_provider 拆出为独立仓库。
数据服务已迁移至 jack/data_provider,不再随 chan 维护。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:10:29 +08:00
jackyu66gitandCursor b31215057e chore: 将 bsp_monitor 拆出为独立仓库。
监控服务已迁移至 jack/bsp_monitor,不再随 chan 维护。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:09:43 +08:00
jackyu66git 2e905e7238 feat: 所有页面接入 Google Analytics (G-LVVXH3TL04) 2026-07-02 15:57:15 +08:00
jackyu66git 02a52c04dd feat: 所有页面接入 Google Analytics (G-LVVXH3TL04) 2026-07-02 15:38:31 +08:00
jackyu66git 19c8f86862 docs: API 手册新增 Onchain Metrics 专题 + endpoints 表更新 2026-07-02 15:19:45 +08:00
jackyu66git ffe7074fef data_provider: 新增链上指标模块 (btc_netflow/stablecoin_supply/etf_flow/mvrv_zscore)
- onchain_metrics.py: 独立模块,CoinMetrics/CoinGecko/Farside 免费数据源
- main.py: 集成后台线程 + REST API (/api/onchain/metrics, /latest, /available)
- requirements.txt: 添加 requests 依赖
- 5分钟自动刷新,CSV 落盘到 data/onchain/
2026-07-02 15:09:02 +08:00
jackyu66git 7b91f459d7 scheduler: auto-detect new signals once per day, deduplicate existing
- scheduler tick runs detect after fetch+score (once per UTC day)
- ChanSignalDetector skips already-recorded signals
- Prevents duplicate signal_features entries on repeated runs
2026-06-24 19:19:40 +08:00
jackyu66git 3c72aa1310 chan_integration: auto-detect BSP signals from daily+4h Chan pipeline
- ChanSignalDetector: runs TF_DF pipeline on historical OHLCV
- Extracts B1/B2/B3/S1/S2/S3 with entry price, date, signal grade
- Populates signal_features via SignalTracker with forward outcomes
- CLI: python main.py detect --from 2024-01-01
- 15 signals detected (5 daily + 10 4h), all directionally correct
- Expectancy API now returns real conditional probabilities
2026-06-24 19:19:11 +08:00
jackyu66git 8d916371e2 backfill: historical breadth + regime computation from TOP50 OHLCV
- Step 1: fetch BTC OHLCV
- Step 2: fetch TOP50 daily data → compute breadth per date → store breadth_daily
- Step 3: compute Price/Breadth/OI/Vol → detect regime → store regime_history
- 175 days backfilled (2026-01-01 to 2026-06-24)
2026-06-24 18:37:20 +08:00
jackyu66git 7e19c9858e scheduler: auto fetch+score every 60min, integrated into web and CLI 2026-06-24 18:35:47 +08:00
jackyu66git efb721b39f fix: persist regime to DB in shared _build_state, deduplicate save logic
- _build_market_state (CLI) now saves regime_history automatically
- _build_state (web) now saves regime_history automatically
- Remove duplicate regime save from cmd_score
- Remove unused imports (timedelta, get_connection)
- Fix: web dashboard never updated regime_history table
2026-06-24 18:31:00 +08:00
jackyu66git 7813e319b4 web: professional trading-terminal redesign — dark theme, chart grid, progress bars 2026-06-24 18:28:40 +08:00
jackyu66git f391020f78 web: fix dark theme readability — explicit bright colors for all factor values 2026-06-24 18:27:41 +08:00
jackyu66git 0ba5b3bd71 chanmacro: add web dashboard (Flask + Chart.js, port 8124)
- /api/state: current market state with all factor scores
- /api/history: regime + breadth history for charts
- /api/expectancy: signal expectancy query
- Bootstrap 5 + Chart.js dark theme, Chinese UI
- Factor cards, regime timeline, breadth chart, expectancy table
2026-06-24 18:25:33 +08:00
jackyu66git 50a609f7b9 chanmacro: connect to production provider, fix Breadth symbol list and regime crash
- Change provider_url to https://provider.jackyu66.com
- Update top50_symbols to match provider's actual 20 symbols
- Fix cmd_score crash: all_scores keys are already strings, not enums
- Add .gitignore to exclude data/ directory
2026-06-24 18:23:27 +08:00
jackyu66git 48e69179b3 data_provider: add /api/derivatives endpoint documentation 2026-06-24 17:47:42 +08:00
jackyu66gitandClaude 71951019fb chanmacro: Signal Expectancy Engine V1 — Market Memory System
Phase A-C complete: 4 core factors, regime detection, signal tracking, Bayesian expectancy.

chanmacro/ (32 files, ~4000 lines):
- models: 12 enums + 15 Pydantic v2 models (DateAwareModel, MarketStateVector, etc.)
- fetchers: OHLCV + Breadth (from data_provider) + Derivatives (new endpoint)
- scoring: Price Structure / Breadth (quantile buckets) / OI Matrix (5 discrete states) / Volatility Regime
- regime_detector: 3-state (TREND/RANGE/PANIC), factor-locked (Price+Breadth+Vol), versioned, 2-day confirmation
- expectancy: SignalTracker (record+outcomes), TimeDecay (half-life=180d), BayesianExpectancyEngine (Empirical Bayes, Leveled, SufficiencyGuard)
- validation: FactorValidator (IC/ICIR/Hit Ratio), RegimeValidator (MI/KL/ANOVA), TransitionValidator (stability)
- CLI: fetch|score|regime|track|backfill|expectancy|validate|serve
- tests: 52 passing (models, scoring, regime, expectancy)

data_provider:
- /api/derivatives endpoint: funding rate, OI, OI change, basis
- _derivatives storage: same persist pattern as K-line (merge→lock→snapshot→atomic write)
- background refresh every 60s

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-24 17:44:55 +08:00
jackyu66git 34040575c1 bsp_monitor: fetcher limit=1000, engine/main tweaks 2026-06-04 12:51:58 +08:00
jackyu66git e1116edb7b 更新了本地数据拉取 2026-05-26 14:49:31 +08:00
jackyu66gitandClaude Opus 4.7 8bc23c0507 notify: 移除持久化去重,BSP 由新笔确认驱动不重复
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:46:10 +08:00
jackyu66gitandClaude Opus 4.7 c75d5e11fc notify: Telegram token/chatid 直接硬编码
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:45:41 +08:00
jackyu66gitandClaude Opus 4.7 8eb50e3eae bsp_monitor: 多周期 BSP 推送 (1m/5m/15m/1h),中枢监控代码保留但暂停
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:42:53 +08:00
jackyu66gitandClaude Opus 4.7 42296ef971 refactor: BSP推送提取公共函数 + 清理
- _push_bsp() 提取重复的key构造+推送逻辑
- bsp.klc None防护
- getattr替代hasattr+属性访问
- 修正首轮日志(不再写"不推送")

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:05:20 +08:00
jackyu66gitandClaude Opus 4.7 a84a80cb62 Revert: BSP独立跟踪confirmed[-1],不与中枢监控耦合
B1/B2依赖中枢存在,不能等中枢更新才查BSP。
保持独立bi_id跟踪confirmed[-1]变化,分型确认时即查BSP。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:02:07 +08:00
jackyu66gitandClaude Opus 4.7 63787b173a fix: 新笔确认即查BSP(反向二类分型触发),首轮也查confirmed[-1]
笔被反向二类分型确认时is_sure=True,不需要等下一笔。
- 跟踪confirmed[-1]变化→查新确认那笔自身的BSP
- 首轮也查confirmed[-1],避免漏掉监控启动前刚确认的BSP

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 13:59:02 +08:00
jackyu66gitandClaude Opus 4.7 07f079067f fix: 跟踪confirmed[-1],新笔确认时查上一轮confirmed[-1]的BSP
以前跟踪bi_list[-1](含未确认)导致时序不对。
现在跟踪confirmed[-1]的稳定ID,变化时在bi_list中精确定位
上一轮的那笔,查其end_klc是否为BSP。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 13:55:48 +08:00
jackyu66gitandClaude Opus 4.7 ae4c79c133 fix: BSP检测用last_bi_id精确定位旧笔,替代confirmed[-2]索引
管线重算后笔列表可能变化,confirmed[-2]不一定是刚结束的笔。
改为用上一轮的last_bi_id在当前bi_list中精确查找,
找到后再检查其end_klc是否为BSP。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 13:35:20 +08:00
jackyu66gitandClaude Opus 4.7 743c5d342e fix: review修复 — 补回last_df_ts、枚举替换魔数、移除死代码
- SymbolState 补回 last_df_ts,无效新K线时跳过管线
- _bi_id 添加 start_klc None 防护
- last_bi.dir.value == 1 改为 Chan_BI_DIR.UP 枚举比较
- notify.py 移除未使用的 register_bsp_keys

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 12:56:17 +08:00