Document S/R findings and isolate legacy gate features
This commit is contained in:
@@ -242,3 +242,28 @@ class TestDetectSrLevels:
|
||||
# The research control intentionally keeps the deployed detector's much
|
||||
# denser output instead of borrowing the rewrite's presentation cap.
|
||||
assert len(levels) > MAX_LEVELS
|
||||
|
||||
def test_legacy_geometry_neutral_changes_only_strength(self):
|
||||
highs, lows, closes, volumes = _make_series(n=500)
|
||||
control = detect_sr_levels_legacy(highs, lows, closes, volumes)
|
||||
neutral = detect_sr_levels_legacy(
|
||||
highs, lows, closes, volumes, neutral_strength=True
|
||||
)
|
||||
assert [level["price_level"] for level in neutral] == [
|
||||
level["price_level"] for level in sorted(
|
||||
control, key=lambda row: row["price_level"]
|
||||
)
|
||||
]
|
||||
assert all(level["strength"] == 50 for level in neutral)
|
||||
|
||||
def test_legacy_source_ablation_isolates_candidates(self):
|
||||
highs, lows, closes, volumes = _make_series(n=500)
|
||||
pivots = detect_sr_levels_legacy(
|
||||
highs, lows, closes, volumes, include_volume_profile=False
|
||||
)
|
||||
traffic = detect_sr_levels_legacy(
|
||||
highs, lows, closes, volumes, include_pivots=False
|
||||
)
|
||||
assert pivots and traffic
|
||||
assert all(level["sources"] == ["pivot_point"] for level in pivots)
|
||||
assert all(level["sources"] == ["volume_profile"] for level in traffic)
|
||||
|
||||
Reference in New Issue
Block a user