mirror of
https://ghfast.top/https://github.com/aeroxw/easy-tdx.git
synced 2026-09-12 18:04:16 +08:00
fix: chanlun bi algorithm stuck in fractal trap during sustained trends
Fix find_bis() greedy algorithm terminating early when dense alternating fractals cause gap=0 for every opposite-type fractal. The root cause was blindly replacing start_fx with more extreme same-type fractals, pushing right_kline_index forward and making subsequent gaps permanently 0. Solution: add pending_opposite guard — when an opposite-type fractal fails the gap check, freeze start_fx replacement until a valid bi is formed. - Affects: sustained up/down trends with dense fractals (e.g. high-price stocks) - 600519: 114 bi (ending 04-28) -> 142 bi (ending 05-27) - 601088: 131 bi -> 147 bi (end date unchanged) - New regression test: test_fractal_trap_regression - Bump version to 1.7.1
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "easy-tdx"
|
||||
version = "1.7.0"
|
||||
version = "1.7.1"
|
||||
description = "通达信 TCP 协议行情数据客户端,支持在线行情、离线数据读取与写入同步"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
Reference in New Issue
Block a user