stale_push_wlin: 按Dad确认流程重构推送逻辑
1. 加重评冷却(4小时)— 查holding_strategies.updated_at 2. 修zone_notes早退bug — 有区间说明时不静默退出 3. zone_notes冷却30分→4小时(匹配重评冷却) 4. 标题自适应:有推荐→自选买入提醒 | 仅区间提醒→操作区间提醒 5. 区间说明格式:'进入操作区间,但重评结果:x' 6. 操作建议标题只在有可操作项时显示 7. has_actionable判定改用实际lines内容
This commit is contained in:
+60
-20
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"last_updated": "2026-07-08 15:41",
|
||||
"total_candidates": 34,
|
||||
"last_updated": "2026-07-09 10:32",
|
||||
"total_candidates": 35,
|
||||
"sectors_analyzed_today": [
|
||||
"半导体",
|
||||
"金属新材料",
|
||||
@@ -1352,18 +1352,18 @@
|
||||
"code": "002371",
|
||||
"name": "北方华创",
|
||||
"sector": "半导体",
|
||||
"xiaoguo_score": 8.0,
|
||||
"xiaoguo_reason": "平台型半导体设备龙头,覆盖刻蚀/沉积/清洗等全环节,业绩确定性高。板块资金净流入主力承接标的,估值处于历史中低位区间。",
|
||||
"xiaoguo_score": 8,
|
||||
"xiaoguo_reason": "半导体设备平台型龙头,订单饱满且国产替代核心受益者,技术面处于箱体震荡下沿,具备较高安全边际与弹性。",
|
||||
"xiaoguo_strategy": {
|
||||
"entry_range": "295-305元",
|
||||
"stop_loss": "282元",
|
||||
"target": "340-355元"
|
||||
"entry_range": "280-290元",
|
||||
"stop_loss": "265元",
|
||||
"target": "330-350元"
|
||||
},
|
||||
"verified_price": 795.78,
|
||||
"verified_change": -0.97,
|
||||
"verified_price": 826.0,
|
||||
"verified_change": 2.95,
|
||||
"added_at": "2026-07-07 12:12",
|
||||
"last_updated": "2026-07-07 13:19",
|
||||
"num_observations": 2,
|
||||
"last_updated": "2026-07-09 10:07",
|
||||
"num_observations": 3,
|
||||
"score_history": [
|
||||
{
|
||||
"date": "2026-07-07 12:12",
|
||||
@@ -1372,6 +1372,10 @@
|
||||
{
|
||||
"date": "2026-07-07 13:19",
|
||||
"score": 8.0
|
||||
},
|
||||
{
|
||||
"date": "2026-07-09 10:07",
|
||||
"score": 8
|
||||
}
|
||||
],
|
||||
"zhiwei_star": null,
|
||||
@@ -1388,18 +1392,18 @@
|
||||
"code": "688012",
|
||||
"name": "中微公司",
|
||||
"sector": "半导体",
|
||||
"xiaoguo_score": 8.5,
|
||||
"xiaoguo_reason": "刻蚀设备国产替代核心标的,订单饱满,AI/HBM扩产直接受益。技术面回踩关键支撑位获资金承接,机构持仓集中。",
|
||||
"xiaoguo_score": 7.5,
|
||||
"xiaoguo_reason": "刻蚀设备全球竞争力强,受益晶圆厂扩产与先进制程突破,短期随板块回调至支撑位,风险收益比合理。",
|
||||
"xiaoguo_strategy": {
|
||||
"entry_range": "175-182元",
|
||||
"stop_loss": "168元",
|
||||
"target": "205-215元"
|
||||
"entry_range": "180-185元",
|
||||
"stop_loss": "170元",
|
||||
"target": "210-220元"
|
||||
},
|
||||
"verified_price": 414.06,
|
||||
"verified_change": -1.41,
|
||||
"verified_price": 438.5,
|
||||
"verified_change": 3.66,
|
||||
"added_at": "2026-07-07 12:12",
|
||||
"last_updated": "2026-07-07 13:19",
|
||||
"num_observations": 2,
|
||||
"last_updated": "2026-07-09 10:07",
|
||||
"num_observations": 3,
|
||||
"score_history": [
|
||||
{
|
||||
"date": "2026-07-07 12:12",
|
||||
@@ -1408,6 +1412,10 @@
|
||||
{
|
||||
"date": "2026-07-07 13:19",
|
||||
"score": 8.5
|
||||
},
|
||||
{
|
||||
"date": "2026-07-09 10:07",
|
||||
"score": 7.5
|
||||
}
|
||||
],
|
||||
"zhiwei_star": null,
|
||||
@@ -1579,6 +1587,38 @@
|
||||
"drop_reason": null,
|
||||
"trend_warning": false,
|
||||
"trend_note": ""
|
||||
},
|
||||
{
|
||||
"code": "603986",
|
||||
"name": "兆易创新",
|
||||
"sector": "半导体",
|
||||
"xiaoguo_score": 7,
|
||||
"xiaoguo_reason": "存储与MCU双轮驱动,消费电子复苏与车规需求拉动业绩拐点,技术面缩量企稳,适合波段操作。",
|
||||
"xiaoguo_strategy": {
|
||||
"entry_range": "75-80元",
|
||||
"stop_loss": "70元",
|
||||
"target": "95-100元"
|
||||
},
|
||||
"verified_price": 642.95,
|
||||
"verified_change": 6.6,
|
||||
"added_at": "2026-07-09 10:07",
|
||||
"last_updated": "2026-07-09 10:07",
|
||||
"num_observations": 1,
|
||||
"score_history": [
|
||||
{
|
||||
"date": "2026-07-09 10:07",
|
||||
"score": 7
|
||||
}
|
||||
],
|
||||
"zhiwei_star": null,
|
||||
"zhiwei_reviewed": false,
|
||||
"zhiwei_reviewed_at": null,
|
||||
"promoted": false,
|
||||
"promoted_at": null,
|
||||
"dropped": false,
|
||||
"drop_reason": null,
|
||||
"trend_warning": false,
|
||||
"trend_note": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
+87
-937
File diff suppressed because it is too large
Load Diff
@@ -151,6 +151,11 @@
|
||||
"content": "博创科技(300548) 214.13 在买入区✅ | 模塑科技(000700) 16.75 在买入区✅ | 贵州茅台(600519) 1206.91 在买入区✅ | 比亚迪A(002594) 87.",
|
||||
"report_id": "cron_99c06255590a_2026-07-07_08-43-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-07-09T08:55:03.395979",
|
||||
"content": "**腾讯(00700)** 现价¥478.80 | 仓位未计 | 持有盈利+8.0%",
|
||||
"report_id": "cron_99c06255590a_2026-07-09_08-38-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-06-02T11:55:44.093905",
|
||||
"content": "❌ 反例:腾讯00700,底仓100股(3.59%),浮盈+4.79%。看到\"距止盈470仅0.77%\"就建议触及减仓清仓 —— 机械执行,未考虑底仓属性+浮盈幅度。",
|
||||
|
||||
@@ -46,6 +46,11 @@
|
||||
"content": "长芯博创(300548) @281.99 +21.83% 放量走强持有,止损261.71;辽宁成大(600739) @10.09 -17.88% 弱撑10.0待企稳;海博思创(688411) @281",
|
||||
"report_id": "cron_99c06255590a_2026-06-19_08-32-54"
|
||||
},
|
||||
{
|
||||
"time": "2026-07-09T08:55:03.395979",
|
||||
"content": "- **中国神华(01088)** ¥41.42 — 入区¥40.59-41.81,+2.17%反弹,持有",
|
||||
"report_id": "cron_99c06255590a_2026-07-09_08-38-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-06-01T13:55:12.662353",
|
||||
"content": "**🟢中国神华(01088) | 47.200 +4.70%⚠️** → 煤炭护盘走强,关注45~47低吸区间,建议仓位5%",
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
"content": "长飞光纤光缆(06869) 255.40+6.68%放量大涨,持有等站上成本263.72;腾讯(00700) 429.80+2.28%,买入区435-440依然可加;中芯H(00981) 89.40+",
|
||||
"report_id": "cron_99c06255590a_2026-07-01_08-39-42"
|
||||
},
|
||||
{
|
||||
"time": "2026-07-09T08:55:03.395979",
|
||||
"content": "- **比亚迪(01211)** ¥85.85 — 入区¥83.79-87.21内,+2.88%回暖,持有",
|
||||
"report_id": "cron_99c06255590a_2026-07-09_08-38-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-06-12T08:55:34.669098",
|
||||
"content": "港股:比亚迪H 01211(6.05%)-2.13%成本95.9浮亏-12.1%策略区间内;万科02202(6.02%)+1.15%策略区间内;中银香港02388(5.46%)+1.12%浮盈+6.9",
|
||||
|
||||
@@ -71,6 +71,11 @@
|
||||
"content": "**丘钛科技(01478)** — 现价6.86 | 成本13.47深度套牢-49%,止损6.18仅10%空间。手机链受韩国科技股崩盘情绪拖累,破6.5必须执行止损。",
|
||||
"report_id": "cron_99c06255590a_2026-07-02_08-32-48"
|
||||
},
|
||||
{
|
||||
"time": "2026-07-09T08:55:03.395979",
|
||||
"content": "- **丘钛科技(01478)** ¥6.92 — 已触及T/P¥7.34附近,+6.13%强势,考虑止盈半仓",
|
||||
"report_id": "cron_99c06255590a_2026-07-09_08-38-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-06-02T12:55:54.834592",
|
||||
"content": "| 丘钛科技(01478) | 10.12 | -1.17% | 9.19% | 深套持有,止损9.0 |",
|
||||
|
||||
@@ -66,6 +66,11 @@
|
||||
"content": "**① 万科企业(02202) ⚠️ 触及止损边缘**",
|
||||
"report_id": "cron_99c06255590a_2026-07-08_08-39-49"
|
||||
},
|
||||
{
|
||||
"time": "2026-07-09T08:55:03.395979",
|
||||
"content": "- **万科企业(02202)** ¥2.27 — 触及入区上沿,+2.25%反弹,地产无强催化,持有不动",
|
||||
"report_id": "cron_99c06255590a_2026-07-09_08-38-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-06-02T12:55:54.834592",
|
||||
"content": "| 万科企业(02202) | 2.76 | -0.72% | 3.39% | 深套持有,止损2.5 |",
|
||||
|
||||
@@ -61,6 +61,11 @@
|
||||
"content": "**② 中科电气(300035) ⚠️ 触及止损边缘**",
|
||||
"report_id": "cron_99c06255590a_2026-07-08_08-39-49"
|
||||
},
|
||||
{
|
||||
"time": "2026-07-09T08:55:03.395979",
|
||||
"content": "- **中科电气(300035)** ¥13.37 — 入区¥12.03-14.04内,-2.34%稳定,持有",
|
||||
"report_id": "cron_99c06255590a_2026-07-09_08-38-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-06-02T12:55:54.834592",
|
||||
"content": "| 中科电气(300035) | 16.44 | -2.66% | 1.77% | 深套持有,止损15.0 |",
|
||||
|
||||
@@ -61,6 +61,11 @@
|
||||
"content": "长飞光纤光缆(06869) 255.40+6.68%放量大涨,持有等站上成本263.72;腾讯(00700) 429.80+2.28%,买入区435-440依然可加;中芯H(00981) 89.40+",
|
||||
"report_id": "cron_99c06255590a_2026-07-01_08-39-42"
|
||||
},
|
||||
{
|
||||
"time": "2026-07-09T08:55:03.395979",
|
||||
"content": "- **黄金ETF(518880)** ¥8.59 — 接近T/P¥8.64,中东冲突利好金价,持有待冲高",
|
||||
"report_id": "cron_99c06255590a_2026-07-09_08-38-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-06-02T12:55:54.834592",
|
||||
"content": "| 黄金ETF(518880) | 9.323 | -0.22% | 2.14% | 深套持有,止损9.0 |",
|
||||
|
||||
@@ -91,6 +91,11 @@
|
||||
"content": "长飞光纤光缆(06869) 255.40+6.68%放量大涨,持有等站上成本263.72;腾讯(00700) 429.80+2.28%,买入区435-440依然可加;中芯H(00981) 89.40+",
|
||||
"report_id": "cron_99c06255590a_2026-07-01_08-39-42"
|
||||
},
|
||||
{
|
||||
"time": "2026-07-09T08:55:03.395979",
|
||||
"content": "- **法拉电子(600563)** ¥140.84 — 入区¥137.01-143.86,-6.40%偏弱,接近止损¥135.42",
|
||||
"report_id": "cron_99c06255590a_2026-07-09_08-38-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-06-02T12:55:54.834592",
|
||||
"content": "| 法拉电子(600563) | 159.76 | +3.47% | 3.0% | 持有,止损153止盈170 |",
|
||||
|
||||
@@ -51,6 +51,11 @@
|
||||
"content": "③ **中芯国际(688981/00981)** 现价144.1/80.4 | 仓位合计9.64% | 双市场止损均破",
|
||||
"report_id": "cron_99c06255590a_2026-07-03_08-33-17"
|
||||
},
|
||||
{
|
||||
"time": "2026-07-09T08:55:03.395979",
|
||||
"content": "**中芯国际A(688981)** 现价¥152.10 | 仓位5.44% | 持有盈利+20.7%",
|
||||
"report_id": "cron_99c06255590a_2026-07-09_08-38-59"
|
||||
},
|
||||
{
|
||||
"time": "2026-06-01T11:55:35.956320",
|
||||
"content": "• **688981|中芯国际|134.87|-3.60%|建议观望等企稳【短线】|前几日大涨后获利回吐,关注134支撑**",
|
||||
|
||||
@@ -1,14 +1,381 @@
|
||||
{
|
||||
"checked_at": "2026-07-08T09:00:59",
|
||||
"total_active": 0,
|
||||
"flagged_count": 0,
|
||||
"flagged": [],
|
||||
"checked_at": "2026-07-09T09:00:42",
|
||||
"total_active": 37,
|
||||
"flagged_count": 24,
|
||||
"flagged": [
|
||||
{
|
||||
"code": "000657",
|
||||
"name": "中钨高新",
|
||||
"price": 73.95,
|
||||
"flags": [
|
||||
"现价73.95在买入区72~75(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "72~75",
|
||||
"current": "盈利持有 | 缩量 | 目标84.52 | 止损71.69 | 买入区72.47~75.43",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "000850",
|
||||
"name": "华茂股份",
|
||||
"price": 3.81,
|
||||
"flags": [
|
||||
"现价3.81在买入区4~4(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "4~4",
|
||||
"current": "盈利持有 | 量价齐升(建仓特征) | 近5日增量涨价=建仓型 | 目标4.04 | 止损3.7 | 买入区3.73~3.84",
|
||||
"updated_by": "manual_analysis_v4",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "000949",
|
||||
"name": "新乡化纤",
|
||||
"price": 5.61,
|
||||
"flags": [
|
||||
"[STRATEGY_STALE] 信号不良(timing_signal含['弱势持有'])",
|
||||
"现价5.61在买入区6~6(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-08 21:17:08",
|
||||
"entry_zone": "6~6",
|
||||
"current": "盈利持有 | 放量下跌⚠️ | 近5日增量跌价=⚠️出货型 | 目标5.99 | 止损5.44 | 买入区5.5~5.66 | 信号:弱势持有",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "001309",
|
||||
"name": "德明利",
|
||||
"price": 825.0,
|
||||
"flags": [
|
||||
"现价825.00在买入区808~842(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "808~842",
|
||||
"current": "盈利持有 | 正常 | 目标936.1 | 止损786.59 | 买入区808.5~841.5",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "002371",
|
||||
"name": "北方华创",
|
||||
"price": 802.32,
|
||||
"flags": [
|
||||
"现价802.32在买入区786~807(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "786~807",
|
||||
"current": "盈利持有 | ⚠️盈亏比偏低(1:1.9),谨慎买入 | 正常 | 目标862.13 | 止损770.21 | 买入区786.27~806.98 | 信号:买入",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "002594",
|
||||
"name": "比亚迪",
|
||||
"price": 87.8,
|
||||
"flags": [
|
||||
"现价87.80在买入区86~89(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "86~89",
|
||||
"current": "盈利持有 | 正常 | 目标94.19 | 止损85.17 | 买入区86.04~88.78 | 信号:买入",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "00700",
|
||||
"name": "腾讯控股",
|
||||
"price": 474.8,
|
||||
"flags": [
|
||||
"现价474.80在买入区465~484(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "465~484",
|
||||
"current": "盈利持有 | 正常 | 目标519.27 | 止损460.56 | 买入区465.3~484.04",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "01088",
|
||||
"name": "中国神华",
|
||||
"price": 41.42,
|
||||
"flags": [
|
||||
"[STRATEGY_STALE] 信号不良(timing_signal含['弱势持有'])",
|
||||
"现价41.42在买入区41~42(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "41~42",
|
||||
"current": "盈利持有 | 正常 | 目标44.49 | 止损40.03 | 买入区40.59~41.81 | 信号:弱势持有",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "01211",
|
||||
"name": "比亚迪股份",
|
||||
"price": 85.5,
|
||||
"flags": [
|
||||
"现价85.50在买入区84~87(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "84~87",
|
||||
"current": "盈利持有 | 量价齐升(建仓特征) | 近5日增量涨价=建仓型 | 目标96.43 | 止损81.1 | 买入区83.79~87.21 | 信号:买入",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "02202",
|
||||
"name": "万科企业",
|
||||
"price": 2.27,
|
||||
"flags": [
|
||||
"[STRATEGY_STALE] 信号不良(timing_signal含['弱势持有'])",
|
||||
"现价2.27在买入区2~2(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "2~2",
|
||||
"current": "盈利持有 | ⚠️盈亏比偏低(1:1.6),谨慎买入 | 量价背离 | 近5日减量涨价=⬆量价背离 | 目标2.43 | 止损2.17 | 买入区2.22~2.27 | 信号:弱势持有",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "300124",
|
||||
"name": "汇川技术",
|
||||
"price": 63.2,
|
||||
"flags": [
|
||||
"现价63.20在买入区62~64(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "62~64",
|
||||
"current": "盈利持有 | 放量下跌⚠️ | 近5日增量跌价=⚠️出货型 | 目标75.61 | 止损61.3 | 买入区61.94~64.46 | 信号:关注",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "300308",
|
||||
"name": "中际旭创",
|
||||
"price": 1128.35,
|
||||
"flags": [
|
||||
"现价1128.35在买入区1106~1139(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "1106~1139",
|
||||
"current": "盈利持有 | 正常 | 目标1205.48 | 止损1094.5 | 买入区1105.78~1138.89",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "301308",
|
||||
"name": "江波龙",
|
||||
"price": 592.71,
|
||||
"flags": [
|
||||
"现价592.71在买入区581~605(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-08 15:02:12",
|
||||
"entry_zone": "581~605",
|
||||
"current": "盈利持有 | 正常 | 目标741.03 | 止损572.25 | 买入区580.86~604.56",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "600519",
|
||||
"name": "贵州茅台",
|
||||
"price": 1199.3,
|
||||
"flags": [
|
||||
"[STRATEGY_STALE] 信号不良(timing_signal含['弱势持有'])",
|
||||
"现价1199.30在买入区1175~1204(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "1175~1204",
|
||||
"current": "盈利持有 | ⚠️盈亏比偏低(1:1.8),谨慎买入 | 正常 | 目标1265.1 | 止损1163.32 | 买入区1175.31~1204.03 | 信号:弱势持有",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "601101",
|
||||
"name": "昊华能源",
|
||||
"price": 12.23,
|
||||
"flags": [
|
||||
"现价12.23在买入区12~12(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-08 15:02:12",
|
||||
"entry_zone": "12~12",
|
||||
"current": "盈利持有 | 目标13.35 | 止损11.75 | 买入区11.99~12.39",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "601318",
|
||||
"name": "中国平安",
|
||||
"price": 49.54,
|
||||
"flags": [
|
||||
"现价49.54远低于买入区95~99,买入区需下移"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "95~99",
|
||||
"current": "盈利持有 | ⚠️盈亏比不足1:1.5,不建议买入 | 量价背离 | 近5日减量涨价=⬆量价背离 | 目标51.96 | 止损参考0.0 | 买入区0.0~0.0 | 信号:弱势持有",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "603501",
|
||||
"name": "豪威集团",
|
||||
"price": 100.95,
|
||||
"flags": [
|
||||
"现价100.95在买入区99~101(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-08 15:02:12",
|
||||
"entry_zone": "99~101",
|
||||
"current": "盈利持有 | ⚠️盈亏比偏低(1:1.7),谨慎买入 | 正常 | 目标106.95 | 止损97.48 | 买入区98.93~101.27 | 信号:买入",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "688041",
|
||||
"name": "海光信息",
|
||||
"price": 343.0,
|
||||
"flags": [
|
||||
"现价343.00在买入区336~350(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-08 15:32:16",
|
||||
"entry_zone": "336~350",
|
||||
"current": "盈利持有 | 正常 | 目标375.46 | 止损332.71 | 买入区336.14~349.81 | 信号:关注",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "688411",
|
||||
"name": "海博思创",
|
||||
"price": 244.0,
|
||||
"flags": [
|
||||
"现价244.00在买入区239~249(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "239~249",
|
||||
"current": "盈利持有 | 正常 | 目标273.42 | 止损236.57 | 买入区239.12~248.88",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "688630",
|
||||
"name": "芯碁微装",
|
||||
"price": 473.26,
|
||||
"flags": [
|
||||
"现价473.26在买入区464~483(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "464~483",
|
||||
"current": "盈利持有 | 正常 | 目标530.49 | 止损451.28 | 买入区463.79~482.73",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "688639",
|
||||
"name": "华恒生物",
|
||||
"price": 16.42,
|
||||
"flags": [
|
||||
"现价16.42在买入区16~16(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "16~16",
|
||||
"current": "盈利持有 | ⚠️盈亏比偏低(1:1.8),谨慎买入 | 缩量 | 目标17.32 | 止损15.93 | 买入区16.09~16.49 | 信号:关注",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "688795",
|
||||
"name": "摩尔线程-U",
|
||||
"price": 666.0,
|
||||
"flags": [
|
||||
"现价666.00在买入区653~679(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "653~679",
|
||||
"current": "盈利持有 | 正常 | 目标748.0 | 止损646.0 | 买入区652.68~679.32",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "688802",
|
||||
"name": "沐曦股份-U",
|
||||
"price": 840.08,
|
||||
"flags": [
|
||||
"现价840.08在买入区830~851(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "830~851",
|
||||
"current": "盈利持有 | ⚠️盈亏比不足1:1.5,不建议买入 | 正常 | 目标1000.79 | 止损参考0.0 | 买入区0.0~0.0 | 信号:关注",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
},
|
||||
{
|
||||
"code": "688981",
|
||||
"name": "中芯国际",
|
||||
"price": 152.1,
|
||||
"flags": [
|
||||
"现价152.10在买入区149~152(是否可买需结合timing_signal判断)"
|
||||
],
|
||||
"age_days": 0,
|
||||
"last_update": "2026-07-09 08:55:21",
|
||||
"entry_zone": "149~152",
|
||||
"current": "盈利持有 | ⚠️盈亏比偏低(1:1.6),谨慎买入 | 正常 | 目标164.94 | 止损144.14 | 买入区149.06~152.46 | 信号:买入",
|
||||
"updated_by": "auto",
|
||||
"updated_reason": "自动生成",
|
||||
"is_watchlist": true
|
||||
}
|
||||
],
|
||||
"portfolio": {
|
||||
"position_pct": 65.65,
|
||||
"position_pct": 65.77,
|
||||
"cash": 321271.0,
|
||||
"weak_position_pct": 0,
|
||||
"all_weak_pct": 0,
|
||||
"signals": []
|
||||
"weak_position_pct": 81.8,
|
||||
"all_weak_pct": 45.9,
|
||||
"signals": [
|
||||
"[PORTFOLIO_WEAK] 组合中弱势+深套分类持仓占比81.8%>40%,建议系统性减仓"
|
||||
]
|
||||
},
|
||||
"summary": "扫描0个策略,0个需关注"
|
||||
"summary": "扫描37个策略,24个需关注"
|
||||
}
|
||||
@@ -167,7 +167,8 @@ def check_signal_pipeline():
|
||||
unproc = 0
|
||||
try:
|
||||
conn = sqlite3.connect(str(DB_PATH))
|
||||
r = conn.execute("SELECT COUNT(*) FROM signal_news WHERE source LIKE 'xiaoguo%' AND (processed=0 OR processed IS NULL)").fetchone()
|
||||
# 只检查时效内的信号堆积(4小时以内),过期信号不被消费者处理但仍会计入堆积
|
||||
r = conn.execute("SELECT COUNT(*) FROM signal_news WHERE source LIKE 'xiaoguo%' AND (processed=0 OR processed IS NULL) AND created_at > datetime('now', '-4 hours')").fetchone()
|
||||
unproc = r[0]
|
||||
conn.close()
|
||||
except:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""stale_detector.py — 检查所有策略,标记价格偏离/过期的策略
|
||||
|
||||
读取 decisions.json 的扁平列表。自选策略和持仓策略分开判断。
|
||||
读取 holding_strategies + watchlist_stocks 的DB双源数据。
|
||||
可被 cron no_agent 模式调用:stdout 注入到后续 LLM 分析。
|
||||
|
||||
输出格式:
|
||||
@@ -162,6 +162,49 @@ def main():
|
||||
except Exception as e:
|
||||
print(f"[AUTO_REASSESS FAIL] {e}")
|
||||
# ----- 结束 自选股重评 -----
|
||||
# 🔁 重评后重新从DB读取策略数据,刷新to_check
|
||||
try:
|
||||
decisions_list = read_decisions()
|
||||
if not isinstance(decisions_list, list):
|
||||
decisions_list = decisions_list.get("decisions", []) if isinstance(decisions_list, dict) else []
|
||||
to_check = [d for d in decisions_list if (d.get("entry_low") is not None or d.get("entry_high") is not None) and d.get("status") not in EXCLUDED_STATUSES]
|
||||
# 重新合并watchlist_stocks
|
||||
db2 = sqlite3.connect('/home/hmo/MoFin/data/mofin.db')
|
||||
db2.row_factory = sqlite3.Row
|
||||
wl_rows2 = db2.execute(
|
||||
"SELECT code, name, price, entry_low, entry_high, stop_loss, analysis_json "
|
||||
"FROM watchlist_stocks WHERE is_active=1 AND entry_low IS NOT NULL AND entry_high IS NOT NULL"
|
||||
).fetchall()
|
||||
db2.close()
|
||||
existing_codes2 = {d["code"] for d in to_check}
|
||||
for row in wl_rows2:
|
||||
code = str(row["code"])
|
||||
if code in existing_codes2:
|
||||
continue
|
||||
entry_low = row["entry_low"]
|
||||
entry_high = row["entry_high"]
|
||||
if not entry_low or not entry_high or entry_low <= 0:
|
||||
continue
|
||||
analysis = {}
|
||||
try:
|
||||
analysis = json.loads(row["analysis_json"]) if row["analysis_json"] and row["analysis_json"] != "null" else {}
|
||||
except (json.JSONDecodeError, TypeError):
|
||||
pass
|
||||
action = analysis.get("action", "") if isinstance(analysis, dict) else ""
|
||||
timing_signal = analysis.get("timing_signal", "买入") if isinstance(analysis, dict) else "买入"
|
||||
wl_entry = {
|
||||
"code": code,
|
||||
"name": row["name"] or code,
|
||||
"entry_low": entry_low,
|
||||
"entry_high": entry_high,
|
||||
"stop_loss": row["stop_loss"],
|
||||
"type": "自选策略",
|
||||
"action": action,
|
||||
"timing_signal": timing_signal,
|
||||
}
|
||||
to_check.append(wl_entry)
|
||||
except Exception as e:
|
||||
print(f"[RELOAD FAIL] {e}", file=sys.stderr)
|
||||
|
||||
# ----- 组合级监测:读取总仓位 + 弱势比例 -----
|
||||
position_pct = 0
|
||||
|
||||
+27
-12
@@ -806,7 +806,8 @@ def main():
|
||||
return text, gap
|
||||
|
||||
# 标准格式:每个可操作标的 — 大盘/行业/个股三面 + 仓位
|
||||
lines.append(f"【💡 操作建议】(当前{n}只自选可操作 | 总资产{total_assets:,.0f}元 现金{available_cash:,.0f}元)")
|
||||
if actionable:
|
||||
lines.append(f"【💡 操作建议】(当前{len(actionable)}只自选可操作 | 总资产{total_assets:,.0f}元 现金{available_cash:,.0f}元)")
|
||||
for s in actionable:
|
||||
name, code, price, buy_low, buy_high, lot, ratio = s
|
||||
d = code_data.get(code, {})
|
||||
@@ -935,16 +936,26 @@ def main():
|
||||
save_cooldown(cooldown)
|
||||
|
||||
# 修正可操作数量(剔除冷却跳过后的实际数量)
|
||||
actual_n = len(lines) - (1 if macro_line else 0) - 1 # 减去市场背景 + 操作建议标题
|
||||
if actual_n != n:
|
||||
# 更新操作建议行
|
||||
for i, ln in enumerate(lines):
|
||||
if "【💡 操作建议】" in ln:
|
||||
lines[i] = f"【💡 操作建议】(当前{actual_n}只自选可操作 | 总资产{total_assets:,.0f}元 现金{available_cash:,.0f}元)"
|
||||
break
|
||||
if actionable:
|
||||
actual_n = sum(
|
||||
1 for ln in lines
|
||||
if ln.startswith(" 🛒") or ln.startswith(" ⚠️")
|
||||
)
|
||||
if actual_n != len(actionable):
|
||||
for i, ln in enumerate(lines):
|
||||
if "【💡 操作建议】" in ln:
|
||||
if actual_n > 0:
|
||||
lines[i] = f"【💡 操作建议】(当前{actual_n}只自选可操作 | 总资产{total_assets:,.0f}元 现金{available_cash:,.0f}元)"
|
||||
else:
|
||||
lines.pop(i) # 全部冷却,移除空标题
|
||||
break
|
||||
|
||||
if actual_n <= 0:
|
||||
return 0 # 全部冷却中 → 静默,不推
|
||||
# 检查最终是否还有内容要推
|
||||
has_actionable = any(
|
||||
ln.startswith(" 🛒") or ln.startswith(" ⚠️") for ln in lines
|
||||
)
|
||||
if not has_actionable and not zone_notes:
|
||||
return 0 # 全部冷却+无区间说明 → 静默
|
||||
|
||||
# ── T+2前瞻:扫描近期可能入买区的A股,提前准备现金 ──
|
||||
t2_lines = []
|
||||
@@ -1004,10 +1015,14 @@ def main():
|
||||
for name, code, price, buy_low, buy_high, reason, sig in zone_notes:
|
||||
lines.append(
|
||||
f" {name}({code}) 价{price:.2f} 区间{buy_low}~{buy_high} "
|
||||
f"→ 重评结果: {reason}"
|
||||
f"→ 进入操作区间,但重评结果: {reason}"
|
||||
)
|
||||
|
||||
lines.insert(0, f"【知微】自选买入提醒 {now} | 总资产{total_assets:,.0f}元")
|
||||
# 标题:有推荐操作→"自选买入提醒",仅有区间说明→"操作区间提醒"
|
||||
if has_actionable:
|
||||
lines.insert(0, f"【知微】自选买入提醒 {now} | 总资产{total_assets:,.0f}元")
|
||||
else:
|
||||
lines.insert(0, f"【知微】操作区间提醒 {now} | 总资产{total_assets:,.0f}元")
|
||||
out = "\n".join(lines)
|
||||
print(out)
|
||||
push_to_xmpp(out)
|
||||
|
||||
@@ -41,7 +41,7 @@ def log_ok(area, desc):
|
||||
def audit_signals(conn):
|
||||
try:
|
||||
total = conn.execute("SELECT COUNT(*) FROM signal_news").fetchone()[0]
|
||||
unproc = conn.execute("SELECT COUNT(*) FROM signal_news WHERE source LIKE 'xiaoguo%' AND (processed=0 OR processed IS NULL)").fetchone()[0]
|
||||
unproc = conn.execute("SELECT COUNT(*) FROM signal_news WHERE source LIKE 'xiaoguo%' AND (processed=0 OR processed IS NULL) AND created_at > datetime('now', '-4 hours')").fetchone()[0]
|
||||
today = conn.execute("SELECT COUNT(*) FROM signal_news WHERE created_at > datetime('now','-1 day')").fetchone()[0]
|
||||
log_ok("信号管道", f"信号库{total}条,今日{today}条,未处理{unproc}条")
|
||||
if unproc > 30:
|
||||
|
||||
@@ -17,7 +17,7 @@ from datetime import datetime
|
||||
# 确保 MoFin 根目录在模块搜索路径中(兼容 cron 环境)
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from mo_data import read_watchlist, get_price
|
||||
from mo_data import read_watchlist
|
||||
from mofin_db import write_watchlist_stock
|
||||
|
||||
BASE = Path("/home/hmo/MoFin")
|
||||
@@ -33,7 +33,7 @@ def clean_proxy():
|
||||
|
||||
|
||||
def fetch_quote(code):
|
||||
"""拉行情。DB 优先,腾讯 fallback"""
|
||||
"""拉行情。DB 优先,腾讯 API fallback"""
|
||||
# DB 优先
|
||||
try:
|
||||
from mofin_db import get_price_from_db
|
||||
@@ -42,11 +42,18 @@ def fetch_quote(code):
|
||||
return {"name":"", "code":code, "price":p, "change_pct":chg or 0}
|
||||
except:
|
||||
pass
|
||||
# Fallback: mo_data.get_price
|
||||
# Fallback: 腾讯实时行情 API
|
||||
try:
|
||||
price, chg = get_price(code)
|
||||
if price is not None:
|
||||
return {"name": "", "code": code, "price": price, "change_pct": chg or 0, "pe": 0, "turnover": 0}
|
||||
url = f"http://qt.gtimg.cn/q={code}"
|
||||
import urllib.request
|
||||
resp = urllib.request.urlopen(url, timeout=10).read().decode("gbk")
|
||||
parts = resp.split("~")
|
||||
if len(parts) > 32:
|
||||
name = parts[1]
|
||||
price = float(parts[3]) if parts[3] else None
|
||||
chg_pct = float(parts[32]) if parts[32] else 0
|
||||
if price:
|
||||
return {"name": name, "code": code, "price": price, "change_pct": chg_pct, "pe": 0, "turnover": 0}
|
||||
return {"code": code, "error": "取价失败"}
|
||||
except Exception as e:
|
||||
return {"code": code, "error": str(e)[:60]}
|
||||
@@ -186,22 +193,28 @@ def main():
|
||||
clean_proxy()
|
||||
start = time.time()
|
||||
today = datetime.now().strftime("%Y-%m-%d")
|
||||
|
||||
|
||||
conn = get_conn()
|
||||
|
||||
# 读未处理 xiaoguo 信号(今日)
|
||||
# 读未处理 xiaoguo 信号(SIGNAL_MAX_AGE_HOURS 以内)
|
||||
rows = conn.execute(
|
||||
"SELECT id, sector, overall_sentiment, summary, key_articles, searched_stocks, source "
|
||||
"FROM signal_news "
|
||||
"WHERE source LIKE 'xiaoguo%' AND (processed=0 OR processed IS NULL) "
|
||||
"AND date(created_at) = ? "
|
||||
"ORDER BY created_at DESC LIMIT 20",
|
||||
(today,)
|
||||
f"AND created_at > datetime('now', '-{SIGNAL_MAX_AGE_HOURS} hours') "
|
||||
"ORDER BY created_at DESC LIMIT 20"
|
||||
).fetchall()
|
||||
|
||||
if not rows:
|
||||
# 标记过期信号为已处理(超出时效边界)
|
||||
old = conn.execute(f"SELECT COUNT(*) FROM signal_news WHERE source LIKE 'xiaoguo%' AND (processed=0 OR processed IS NULL) AND created_at <= datetime('now', '-{SIGNAL_MAX_AGE_HOURS} hours')").fetchone()[0]
|
||||
if old:
|
||||
conn.execute(f"UPDATE signal_news SET processed=1 WHERE source LIKE 'xiaoguo%' AND (processed=0 OR processed IS NULL) AND created_at <= datetime('now', '-{SIGNAL_MAX_AGE_HOURS} hours')")
|
||||
conn.commit()
|
||||
print(f"[SILENT] 清理 {old} 条过期信号(>{SIGNAL_MAX_AGE_HOURS}h)")
|
||||
else:
|
||||
print("[SILENT] 今日无未处理小果信号")
|
||||
conn.close()
|
||||
print("[SILENT] 今日无未处理小果信号")
|
||||
return
|
||||
|
||||
# 尝试从 searched_stocks 提取股票代码
|
||||
|
||||
+224
-321
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -41,7 +41,7 @@ def log_ok(area, desc):
|
||||
def audit_signals(conn):
|
||||
try:
|
||||
total = conn.execute("SELECT COUNT(*) FROM signal_news").fetchone()[0]
|
||||
unproc = conn.execute("SELECT COUNT(*) FROM signal_news WHERE source LIKE 'xiaoguo%' AND (processed=0 OR processed IS NULL)").fetchone()[0]
|
||||
unproc = conn.execute("SELECT COUNT(*) FROM signal_news WHERE source LIKE 'xiaoguo%' AND (processed=0 OR processed IS NULL) AND created_at > datetime('now', '-4 hours')").fetchone()[0]
|
||||
today = conn.execute("SELECT COUNT(*) FROM signal_news WHERE created_at > datetime('now','-1 day')").fetchone()[0]
|
||||
log_ok("信号管道", f"信号库{total}条,今日{today}条,未处理{unproc}条")
|
||||
if unproc > 30:
|
||||
|
||||
Reference in New Issue
Block a user