Exclude open paper trades from discovery
Deploy / lint (push) Successful in 7s
Deploy / test (push) Successful in 1m25s
Deploy / deploy (push) Successful in 43s

This commit is contained in:
2026-07-04 13:01:58 +02:00
parent edc1a9757b
commit 23d1db1f30
4 changed files with 113 additions and 1 deletions
+5 -1
View File
@@ -286,7 +286,11 @@ async def _watchlist_tickers(db: AsyncSession) -> list[tuple[int, str]]:
async def _qualified_setups(db: AsyncSession) -> list[dict]:
# live_recommendation: gate and format on current score/sentiment context,
# not the values frozen into the setup at scan time.
setups = await get_trade_setups(db, live_recommendation=True)
setups = await get_trade_setups(
db,
live_recommendation=True,
exclude_open_trade_tickers=True,
)
config = await get_activation_config(db)
return [s for s in setups if setup_qualifies(SimpleNamespace(**s), config)]