Tighten qualified signal gate
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user