Separate S/R detector tests from primary R:R policy
This commit is contained in:
@@ -137,6 +137,10 @@ SR_RESEARCH_VARIANTS = {
|
||||
"soft_zones",
|
||||
"confirmed_rounds",
|
||||
"gate_v2",
|
||||
"rewrite_legacy_primary",
|
||||
"soft_zones_legacy_primary",
|
||||
"confirmed_rounds_legacy_primary",
|
||||
"gate_v2_legacy_primary",
|
||||
}
|
||||
|
||||
|
||||
@@ -268,10 +272,11 @@ def _window_setups(
|
||||
return []
|
||||
|
||||
sr_variant = _sr_research_variant()
|
||||
if sr_variant in {"production_control", "rr_aligned_control"}:
|
||||
detector_variant = sr_variant.removesuffix("_legacy_primary")
|
||||
if detector_variant in {"production_control", "rr_aligned_control"}:
|
||||
detected_levels = detect_sr_levels_legacy(highs, lows, closes, volumes)
|
||||
else:
|
||||
detector_cap = 0 if sr_variant == "gate_v2" else MAX_LEVELS
|
||||
detector_cap = 0 if detector_variant == "gate_v2" else MAX_LEVELS
|
||||
detected_levels = detect_sr_levels(
|
||||
highs, lows, closes, volumes, max_levels=detector_cap
|
||||
)
|
||||
@@ -281,11 +286,11 @@ def _window_setups(
|
||||
|
||||
gate_levels = _gate_eligible_levels(
|
||||
sr_levels,
|
||||
confirmed_rounds_only=sr_variant in {"confirmed_rounds", "gate_v2"},
|
||||
confirmed_rounds_only=detector_variant in {"confirmed_rounds", "gate_v2"},
|
||||
)
|
||||
zone_strength_mode = (
|
||||
"soft"
|
||||
if sr_variant in {"soft_zones", "confirmed_rounds", "gate_v2"}
|
||||
if detector_variant in {"soft_zones", "confirmed_rounds", "gate_v2"}
|
||||
else "sum"
|
||||
)
|
||||
|
||||
@@ -326,7 +331,7 @@ def _window_setups(
|
||||
targets = _prune_floor_pinned_targets(targets)
|
||||
primary_min_rr = (
|
||||
1.5
|
||||
if sr_variant == "production_control"
|
||||
if sr_variant == "production_control" or sr_variant.endswith("_legacy_primary")
|
||||
else float(activation.get("min_rr", 0.0))
|
||||
)
|
||||
primary = _select_primary_target(
|
||||
|
||||
Reference in New Issue
Block a user