fix: DB路径大面积修复——mofin_db/server/technical_analysis/strategy_tree等脚本的Path(__file__).parent/data错误指向scripts/data而非data/ 导致读写分离
- 量价分析: full_analysis输出volume_deep+成交量存储在price_history.json - FK约束移除: holding_strategies外键->holdings阻止自选股写入 - #000850 重评已写入(止损3.74/止盈4.06/RR1.67)含量价信号
This commit is contained in:
@@ -90,15 +90,15 @@ def run():
|
||||
try:
|
||||
from mo_data import read_portfolio, read_decisions, read_watchlist
|
||||
pf = read_portfolio()
|
||||
lines.append(check(len(pf.get("holdings", [])) > 0, f"portfolio.json DB记录: {len(pf.get('holdings', []))}条"))
|
||||
lines.append(check(len(pf.get("holdings", [])) > 0, f"持仓 DB记录: {len(pf.get('holdings', []))}条"))
|
||||
ok_count += 1
|
||||
wl = read_watchlist()
|
||||
lines.append(check(len(wl.get("stocks", [])) > 0, f"watchlist.json DB记录: {len(wl.get('stocks', []))}条"))
|
||||
lines.append(check(len(wl.get("stocks", [])) > 0, f"自选股 DB记录: {len(wl.get('stocks', []))}条"))
|
||||
ok_count += 1
|
||||
dec = read_decisions()
|
||||
# 注意:holding_strategies 表是决策的DB版本
|
||||
dec_count = len(dec.get("decisions", []))
|
||||
lines.append(check(dec_count > 0, f"decisions.json 记录: {dec_count}条(DB holding_strategies表: {len(pf.get('holdings',[]))}只)"))
|
||||
lines.append(check(dec_count > 0, f"DB策略记录: {dec_count}条"))
|
||||
ok_count += 1
|
||||
except Exception:
|
||||
lines.append(check(False, "MoFin DB 数据读取失败"))
|
||||
|
||||
Reference in New Issue
Block a user