fix: 重新应用scanner+promote的source_strategy补丁(deploy_guard回滚后重做)

This commit is contained in:
xxm
2026-08-17 17:35:14 +08:00
parent 394ff09003
commit 9af213c4f8
5 changed files with 21 additions and 20 deletions
@@ -234,14 +234,14 @@ def main():
_rr_v = round((tp - _mid_v) / (_mid_v - sl), 2) if _mid_v > sl > 0 else 0
conn.execute(
"INSERT INTO candidates (code, name, sector, reason, "
"entry_range, stop_loss, target, rr, created_at) "
"VALUES (?,?,?,?,?,?,?,?,datetime('now','localtime')) "
"entry_range, stop_loss, target, rr, source_strategy, created_at) "
"VALUES (?,?,?,?,?,?,?,?,?,datetime('now','localtime')) "
"ON CONFLICT(code) DO UPDATE SET "
"name=excluded.name, sector=excluded.sector, reason=excluded.reason, "
"entry_range=excluded.entry_range, stop_loss=excluded.stop_loss, target=excluded.target, rr=excluded.rr",
"entry_range=excluded.entry_range, stop_loss=excluded.stop_loss, target=excluded.target, rr=excluded.rr, source_strategy=excluded.source_strategy",
(code, name, "accumulation",
f"主力建仓特征({reasons}) 评分{score}/7",
f"{entry_low}~{entry_high}", sl, tp, _rr_v)
f"{entry_low}~{entry_high}", sl, tp, _rr_v, "accumulation")
)
inserted += 1
print(f" 🟢 {code} {name}{price} 评分{score}/7 {reasons}", flush=True)