Add S/R v2 research and validation harness

This commit is contained in:
2026-07-12 21:15:18 +02:00
parent 57ac1d2cdd
commit 19b81c169d
19 changed files with 1575 additions and 117 deletions
+27
View File
@@ -85,6 +85,33 @@ class TestClusterSrZonesStrength:
zones = cluster_sr_zones(levels, current_price=200.0, tolerance=0.02)
assert zones[0]["strength"] == 30
def test_soft_strength_uses_max_plus_confluence(self):
levels = [
{
"price_level": 100.0,
"strength": 60,
"detection_method": "pivot_point",
"sources": ["pivot_point"],
"rejection_count": 3,
},
{
"price_level": 100.5,
"strength": 60,
"detection_method": "round_number",
"sources": ["round_number"],
"rejection_count": 1,
},
]
zones = cluster_sr_zones(
levels,
current_price=200.0,
tolerance=0.02,
strength_mode="soft",
)
assert zones[0]["strength"] == 65
assert set(zones[0]["sources"]) == {"pivot_point", "round_number"}
assert zones[0]["rejection_count"] == 3
class TestClusterSrZonesTypeTagging:
"""Support vs resistance tagging."""