Tighten qualified signal gate
Deploy / lint (push) Successful in 8s
Deploy / test (push) Successful in 1m18s
Deploy / deploy (push) Successful in 40s

This commit is contained in:
2026-07-04 13:51:44 +02:00
parent 23d1db1f30
commit 65335cf1f3
4 changed files with 74 additions and 20 deletions
+11
View File
@@ -2,6 +2,7 @@
from __future__ import annotations
import json
from datetime import date, datetime, timedelta, timezone
import pytest
@@ -127,6 +128,15 @@ def _make_setup(
detected: datetime | None = None,
**kwargs,
) -> TradeSetup:
targets_json = kwargs.pop(
"targets_json",
json.dumps([{
"price": target,
"rr_ratio": rr,
"probability": 50.0,
"is_primary": True,
}]),
)
return TradeSetup(
ticker_id=ticker.id,
direction=direction,
@@ -136,6 +146,7 @@ def _make_setup(
rr_ratio=rr,
composite_score=50.0,
detected_at=detected or datetime(2026, 1, 2, 21, 0, tzinfo=timezone.utc),
targets_json=targets_json,
**kwargs,
)