fix: 策略缺失量价分析系统 — 新增深度量价分析(放量建仓/出货/洗盘检测)+接入reassess_strategy
This commit is contained in:
@@ -898,6 +898,7 @@ def reassess_strategy(code, name, price, cost, shares, current_action,
|
||||
sr = tech["support_resistance"]
|
||||
candle = tech.get("candlestick", {})
|
||||
vol = tech.get("volume", {})
|
||||
vol_deep = tech.get("volume_deep", {})
|
||||
ss = sr.get("strong_support")
|
||||
ws = sr.get("weak_support")
|
||||
wr = sr.get("weak_resist")
|
||||
@@ -1268,6 +1269,25 @@ def reassess_strategy(code, name, price, cost, shares, current_action,
|
||||
# 融合大盘趋势、行业板块强弱、基本面估值作为修正因子
|
||||
volume_signal = vol.get("volume_signal", "")
|
||||
candlestick_sentiment = candle.get("sentiment", "neutral")
|
||||
|
||||
# ----- 深度量价分析(2026-07-08 新增:放量建仓/出货/洗盘检测)-----
|
||||
deep_vol = {}
|
||||
vol_pattern_note = ""
|
||||
try:
|
||||
from technical_analysis import analyze_volume_deep
|
||||
deep_vol = analyze_volume_deep(code)
|
||||
if deep_vol.get("volume_signal"):
|
||||
vp = deep_vol.get("price_vol_description", "")
|
||||
patterns = deep_vol.get("patterns", {})
|
||||
vol_pattern_note = vp
|
||||
# 合并到volume_signal
|
||||
if volume_signal:
|
||||
volume_signal += f" | {vp}" if vp else ""
|
||||
else:
|
||||
volume_signal = vp or ""
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
timing_signal = "neutral"
|
||||
|
||||
# --- 三维分析数据装载 ---
|
||||
@@ -1438,6 +1458,10 @@ def reassess_strategy(code, name, price, cost, shares, current_action,
|
||||
if action_note:
|
||||
action_parts.append(action_note)
|
||||
|
||||
# 量价分析描述(如有,注入action)
|
||||
if vol_pattern_note:
|
||||
action_parts.append(vol_pattern_note)
|
||||
|
||||
if is_watchlist:
|
||||
# 自选股(未入场):有止损参考+买入区,内部算RR需要止盈位
|
||||
action_parts.append(f"目标参考{new_target}")
|
||||
|
||||
Reference in New Issue
Block a user