Require aligned action for qualified setups
This commit is contained in:
@@ -54,6 +54,7 @@ from app.services.outcome_service import (
|
||||
from app.services.price_service import query_ohlcv
|
||||
from app.services.qualification import (
|
||||
HIGH_CONVICTION_ACTIONS,
|
||||
_action_direction,
|
||||
best_target_probability,
|
||||
setup_qualifies,
|
||||
)
|
||||
@@ -917,7 +918,10 @@ def _gate_ablation(candidates: list[dict], activation: dict, threshold: float) -
|
||||
return (c["confidence"] or 0.0) >= min_conf
|
||||
|
||||
def neutral_ok(c: dict) -> bool:
|
||||
return not exclude_neutral or (c.get("action") or "NEUTRAL") != "NEUTRAL"
|
||||
if not exclude_neutral:
|
||||
return True
|
||||
action_direction = _action_direction(c.get("action"))
|
||||
return action_direction != "neutral" and action_direction == c["direction"]
|
||||
|
||||
def tighteners_ok(c: dict) -> bool:
|
||||
if require_high and (c.get("action") or "") not in HIGH_CONVICTION_ACTIONS:
|
||||
|
||||
Reference in New Issue
Block a user