Isolate residual S/R target selection

This commit is contained in:
2026-07-13 09:05:28 +02:00
parent 04ef7f44a2
commit e31d1704a2
7 changed files with 109 additions and 11 deletions
+7 -3
View File
@@ -60,6 +60,7 @@ def _gate_eligible_levels(
sr_levels: list[Any],
*,
confirmed_rounds_only: bool = False,
exclude_standalone_rounds: bool = False,
min_round_rejections: int = 2,
) -> list[Any]:
"""Return structures allowed to influence entry qualification.
@@ -69,7 +70,7 @@ def _gate_eligible_levels(
either confluence with a pivot/volume source or distinct rejection clusters
before such a level is allowed to manufacture a gate target.
"""
if not confirmed_rounds_only:
if not confirmed_rounds_only and not exclude_standalone_rounds:
return list(sr_levels)
eligible: list[Any] = []
@@ -79,8 +80,11 @@ def _gate_eligible_levels(
])
is_round_only = sources == {"round_number"}
rejections = int(getattr(level, "rejection_count", 0) or 0)
if not is_round_only or rejections >= min_round_rejections:
eligible.append(level)
if exclude_standalone_rounds and is_round_only:
continue
if confirmed_rounds_only and is_round_only and rejections < min_round_rejections:
continue
eligible.append(level)
return eligible