fix: RR门禁前置+盘前标签修正+参数权威保护
- sync_recommend_tag: RR<2.0的买入先查RR再打tag(不落盯盘垃圾) - 参数权威: 技术路径不得覆写12维Zone/SL/TP(防RR波动) - prompt: 价格标签分盘中实时/上次收盘(不骗LLM)
This commit is contained in:
@@ -333,6 +333,13 @@ def build_prompt(data):
|
||||
else:
|
||||
_ta_sec = "【技术位锚】本次计算不可用,请基于价格行为谨慎给出参数,并仍须满足:止损<区间下沿<区间上沿<止盈。"
|
||||
|
||||
# ── 市场状态标签(2026-07-27 老爸:盘前批次数据是昨收,不要骗LLM是"当日实时")──
|
||||
_now = datetime.now()
|
||||
_h, _m, _w = _now.hour, _now.minute, _now.weekday()
|
||||
_is_market_open = _w < 5 and ((_h == 9 and _m >= 30) or (10 <= _h < 15))
|
||||
_price_label = "(盘中实时)" if _is_market_open else "(上次收盘/非交易时段)"
|
||||
_macro_label = "(盘中实时)" if _is_market_open else "(最近更新)"
|
||||
|
||||
return f"""你是一个资深A股分析师。请先审阅以下【原策略全文】,判断是否需要修改策略,然后做出完整的12维矩阵分析。
|
||||
|
||||
【原策略全文】
|
||||
@@ -346,10 +353,10 @@ def build_prompt(data):
|
||||
{_ta_sec}
|
||||
|
||||
当前数据(以下数据均来自实时API,每条标注时间窗口,禁止使用模型内部训练数据):
|
||||
大盘:{data.get('macro','震荡')}(当日实时)
|
||||
最新价:{data.get('price',0)} 涨跌:{data.get('change_pct','0')}%(当日实时)
|
||||
大盘:{data.get('macro','震荡')}{_macro_label}
|
||||
最新价:{data.get('price',0)} 涨跌:{data.get('change_pct','0')}%{_price_label}
|
||||
PE={data.get('pe','?')}(最新财报) 市值={data.get('mcap','?')}亿
|
||||
行业:{data.get('sector_context','?')}(当日实时)
|
||||
行业:{data.get('sector_context','?')}(近一个交易日)
|
||||
技术面:{data.get('tech_snapshot','')[:300]}(MA=5/10/20/60日 支撑阻力=近20日 量价=当日+近5日趋势)
|
||||
资金流:{_flow_note}(近5日累计)
|
||||
消息面:{_news_note}(最近3条,自动标注抓取时间)
|
||||
|
||||
Reference in New Issue
Block a user