fix: align production defaults and close review parity gaps
Ship greenfield min_rr=2.0 and conf=0, read-only Structural S/R, indicator cache invalidation, and UI/gate language that treats GTL as screening not exit. Align strategy_rank missing-vol fallback live vs backtest, single-source PRIMARY_TARGET_MIN_RR, expand prod parity tests, and drop dead FE clients.
This commit is contained in:
@@ -857,8 +857,17 @@ async def get_sr_levels(
|
||||
symbol: str,
|
||||
tolerance: float | None = None,
|
||||
) -> list[SRLevel]:
|
||||
"""Get S/R levels for a ticker, recalculating on every request (MVP).
|
||||
"""Return persisted Structural S/R levels, strength descending.
|
||||
|
||||
Returns levels sorted by strength descending.
|
||||
Read-only: does not recompute or rewrite. Pipeline/ingestion call
|
||||
``recalculate_sr_levels`` to refresh. ``tolerance`` is kept for API
|
||||
compatibility and ignored on read (it only applies at recalculation).
|
||||
"""
|
||||
return await recalculate_sr_levels(db, symbol, tolerance)
|
||||
del tolerance # API compat only; levels were stored at last recalculation
|
||||
ticker = await _get_ticker(db, symbol)
|
||||
result = await db.execute(
|
||||
select(SRLevel)
|
||||
.where(SRLevel.ticker_id == ticker.id)
|
||||
.order_by(SRLevel.strength.desc())
|
||||
)
|
||||
return list(result.scalars().all())
|
||||
|
||||
Reference in New Issue
Block a user