diff --git a/deploy/profile-scripts/market_scanner.py b/archive/20260723-landmine/market_scanner_orphan.py similarity index 100% rename from deploy/profile-scripts/market_scanner.py rename to archive/20260723-landmine/market_scanner_orphan.py diff --git a/deploy/profile-scripts/accumulation_scanner.py b/deploy/profile-scripts/accumulation_scanner.py index 93606cf4..0697655b 100644 --- a/deploy/profile-scripts/accumulation_scanner.py +++ b/deploy/profile-scripts/accumulation_scanner.py @@ -147,8 +147,8 @@ def detect_accumulation(code, info): if 1 <= day_range <= 8: score += 1 - # 综合评分 - if score >= 4: + # 综合评分(2026-07-24 老爸:入门闸 4→5,减少陪跑噪音灌入 candidates) + if score >= 5: entry_low = round(price * 0.95, 2) entry_high = round(price * 1.02, 2) stop_loss = round(price * 0.92, 2) diff --git a/deploy/profile-scripts/promote_candidates.py b/deploy/profile-scripts/promote_candidates.py index 426f51cc..d0602443 100644 --- a/deploy/profile-scripts/promote_candidates.py +++ b/deploy/profile-scripts/promote_candidates.py @@ -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")