Add live.py lifecycle and event candidates; assemble confirmed vs live in engine; Summary partition; execution_signal source=confirmed only. Keep strategies untouched; do not lower Confirmed thresholds for Live. Co-authored-by: Cursor <cursoragent@cursor.com>
1.6 KiB
1.6 KiB
WYCKOFF-MULTI-CYCLE-001
Status: FROZEN
Scope: Wyckoff Cycle Detection Layer
No Change
chan.py/ 笔 / 段 / 中枢strategies//chan_tv
Only Change
- wyckoff range detection
- wyckoff engine payload
- API localization
- chart rendering
- tests
Frozen Rules
- 每个 TF 最大 8 个周期
cycles[0]永远为 ACTIVE;cycles[1:]为 HISTORICAL- 禁止用
cycles[-1]判断 active;唯一来源:active_cycle = cycles[0] - 周期不可重叠;按时间倒序(近 → 远)
- 顶层字段只镜像
cycles[0] - 历史 cycle 只用于展示/分析,不参与当前交易决策
- 多 TF 只同步 active cycle(
prefer_start_time← 主 TFcycles[0]) - 每个 cycle 必须可追溯:
period/status/role/confidence - 嵌套箱:
overlap_ratio < 0.2才可并存;否则丢弃 - 验收重点:历史周期稳定复现 + active 不漂移
Layer Duties
range.py
_detect_in_window() → TradingRange # 仅起止、高低、结构分
detect_trading_ranges() → list[TR] # 倒序扫 + 过滤 + mask
engine.py
phases / events / VP / confidence aggregation → cycles[]
Filter Order(不可改)
candidate window
→ detect range
→ quality filter
→ trend contamination filter
→ overlap filter (<0.2)
→ accept cycle
→ mask
禁止先 mask 再判断质量。
Display / Summary (2026-08-06)
- 图面阶段标记:
{TF} C{id} Phase {X};事件:{TF} C{id} {Event} - Cycle Summary 面板:消费
cycles[0],写入window.wyckoffCycleSummary - 检测算法本轮不改;质量阈值 / 历史层折叠为后续项