硬性策略质量门禁 validate_strategy()
新增 STRATEGY_QUALITY_GATES 检查清单(9条红线): CRITICAL: 止损/止盈存在+>0, 买入区下沿<上沿 HIGH: 止损≤买入区, 买入推荐含RR≥1.5, 港股标currency=HKD MEDIUM: signal短词, tech_snapshot含技术位 enforce_strategy_quality() 插在写入链的两处: 1. reassess_with_context() return前 → 单只重评必过 2. regenerate_all() for d in decisions: 写DB前 → 批量重评必过 不过的:status=review_needed, signal降级→信号不充分 不会写进DB/JSON,除非修复了CRITICAL问题
This commit is contained in:
@@ -390,15 +390,15 @@ def full_analysis(code):
|
||||
|
||||
result = {
|
||||
"quote": {
|
||||
"name": q["name"],
|
||||
"name": q.get("name", code),
|
||||
"price": q["price"],
|
||||
"change_pct": q["change_pct"],
|
||||
"open": q["open"],
|
||||
"high": q["high"],
|
||||
"low": q["low"],
|
||||
"close_yest": q["close_yest"],
|
||||
"volume": q["volume"],
|
||||
"amplitude": q["amplitude"],
|
||||
"change_pct": q.get("change_pct", 0),
|
||||
"open": q.get("open", 0),
|
||||
"high": q.get("high", 0),
|
||||
"low": q.get("low", 0),
|
||||
"close_yest": q.get("close_yest", 0),
|
||||
"volume": q.get("volume", 0),
|
||||
"amplitude": q.get("amplitude", 0),
|
||||
},
|
||||
"support_resistance": sr,
|
||||
"candlestick": candle,
|
||||
|
||||
Reference in New Issue
Block a user