fix: 重新应用scanner+promote的source_strategy补丁(deploy_guard回滚后重做)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user