fix: promote技术位锚定+accumulation入门4→5+watchlist_auto_exit排cron+归档孤儿market_scanner
- promote参数不再信扫描器: ta.full_analysis重定 区(弱撑~弱压)/损(强撑x0.985)/盈(强压) - accumulation_scanner入门闸 score>=4→5(减少陪跑噪音) - watchlist_auto_exit排入系统crontab(每日08:50,此前根本没调度) - market_scanner.py是孤儿(跑的是market_screener),归档
This commit is contained in:
@@ -73,16 +73,36 @@ def main():
|
||||
print(f" ⏭ {code} {name} 价格获取失败({_e}),跳过")
|
||||
continue
|
||||
|
||||
# ── 优中选优闸(2026-07-24 老爸):ST排除 + RR>=2.0 ──
|
||||
# ── 优中选优闸(2026-07-24 老爸):ST排除 + 技术位锚定参数 + RR>=2.0 ──
|
||||
if "ST" in (name or "").upper():
|
||||
print(f" ⏭ {code} {name} ST股,不入自选")
|
||||
continue
|
||||
# 技术位锚定:不信扫描器拍的 entry/sl/tp,用 ta.full_analysis 的确定性技术位重定
|
||||
try:
|
||||
import sys as _s
|
||||
if '/home/hmo/MoFin/deploy/profile-scripts' not in _s.path:
|
||||
_s.path.insert(0, '/home/hmo/MoFin/deploy/profile-scripts')
|
||||
import technical_analysis as _ta
|
||||
_ta_r = _ta.full_analysis(code)
|
||||
_sr = (_ta_r or {}).get("support_resistance", {}) or {}
|
||||
_ws, _ss = _sr.get("weak_support"), _sr.get("strong_support")
|
||||
_wr, _sr2 = _sr.get("weak_resist"), _sr.get("strong_resist")
|
||||
if _ws and _wr and _price > 0:
|
||||
el = round(_ws * 0.995, 2) # 区下沿贴弱撑
|
||||
eh = round(min(_wr, _price * 1.05), 2) # 区上沿取弱压(且不超现价5%)
|
||||
sl = round((_ss or _ws) * 0.985, 2) # 止损=强撑下1.5%(无强撑用弱撑)
|
||||
tp = round(_sr2 or _wr * 1.15, 2) # 止盈=强压(无强压则弱压+15%)
|
||||
except Exception as _te:
|
||||
print(f" ⚠️ {code} 技术位锚定失败({_te}),用扫描器参数", flush=True)
|
||||
if el > 0 and eh > el and sl > 0 and tp > 0:
|
||||
_mid = (el + eh) / 2
|
||||
_rr = (tp - _mid) / (_mid - sl) if (_mid - sl) > 0 else 0
|
||||
if _rr < 2.0:
|
||||
print(f" ⏭ {code} {name} RR={_rr:.2f}<2.0,不入自选")
|
||||
continue
|
||||
else:
|
||||
print(f" ⏭ {code} {name} 锚定后参数无效(区{el}~{eh} 损{sl} 盈{tp}),跳过")
|
||||
continue
|
||||
|
||||
# 构建策略(2026-07-24 老爸:提拔不直接给"买入"——先入观察,12维确认后再升)
|
||||
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
|
||||
Reference in New Issue
Block a user