feat(web): 增量自动刷新、结构区修复与默认指标/周期

自动刷新常态只拉 recent 尾部 K,每 1 分钟全量重算缠论;修复结构区缓存导入;默认指标/4h·1h·15m/近30天;同步 ECR-009 screener 相关改动。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-08 15:45:40 +08:00
co-authored by Cursor
parent 0f6eb92a1f
commit 18a7f485e6
23 changed files with 2133 additions and 310 deletions
+31
View File
@@ -0,0 +1,31 @@
"""Unit tests for TF combo validation."""
from __future__ import annotations
import pytest
from crypto_wyckoff.combos import (
add_combo,
delete_combo,
get_combo,
list_combos,
validate_combo,
)
def test_builtin_default_is_h8_4_1():
c = get_combo(None)
assert c["id"] == "h8_4_1"
assert (c["high"], c["mid"], c["low"]) == ("8h", "4h", "1h")
def test_validate_order():
assert validate_combo("8h", "4h", "1h") is None
assert validate_combo("1h", "4h", "8h") is not None
assert validate_combo("8h", "8h", "1h") is not None
def test_list_includes_dwm():
ids = {c["id"] for c in list_combos()}
assert "h8_4_1" in ids
assert "d_w_m" in ids