半手补整阈值50%→90%,防止现金严重不足却标🛒
修正前:长飞光纤预算60K只有1手112K的一半,却因为 budget > lot_cost*0.5 的规则被凑成1手,标了🛒 修正后:只有预算够90%以上才补整1手 实际影响:长飞光纤现在标⚠️而不是🛒
This commit is contained in:
+52
-52
@@ -301,17 +301,17 @@
|
||||
{
|
||||
"code": "000711",
|
||||
"name": "ST京蓝",
|
||||
"price": 4.91,
|
||||
"price": 4.92,
|
||||
"cost": 0,
|
||||
"shares": 0,
|
||||
"avg_price": 0,
|
||||
"action": "盈利持有 | 目标5.38 | 止损4.76 | 买入区4.81~5.01 | 信号:观望",
|
||||
"stop_loss": 4.76,
|
||||
"entry_low": 4.81,
|
||||
"action": "盈利持有 | 目标5.38 | 止损4.77 | 买入区4.82~5.01 | 信号:观望",
|
||||
"stop_loss": 4.77,
|
||||
"entry_low": 4.82,
|
||||
"entry_high": 5.01,
|
||||
"tech_snapshot": "形态:光头光脚阴线/bearish 量价:主动卖盘占优 强撑:3.94 弱撑:4.82 弱压:5.12 强压:5.38",
|
||||
"tech_snapshot": "形态:光头光脚阴线/bearish 量价:主动卖盘占优 强撑:3.94 弱撑:4.83 弱压:5.12 强压:5.38",
|
||||
"timing_signal": "观望",
|
||||
"rr_ratio": 3.13,
|
||||
"rr_ratio": 3.07,
|
||||
"status": "updated",
|
||||
"note": "",
|
||||
"timestamp": "2026-06-24 09:00",
|
||||
@@ -402,7 +402,7 @@
|
||||
{
|
||||
"id": "000711_stop_loss",
|
||||
"condition": {
|
||||
"price": "<4.76"
|
||||
"price": "<4.77"
|
||||
},
|
||||
"action": {
|
||||
"type": "sell",
|
||||
@@ -420,12 +420,12 @@
|
||||
"condition": {
|
||||
"scenario": "weak_consolidation",
|
||||
"price": "<=5.01",
|
||||
"price_lower": ">=4.81"
|
||||
"price_lower": ">=4.82"
|
||||
},
|
||||
"action": {
|
||||
"type": "buy",
|
||||
"amount": "normal",
|
||||
"limit": 4.81,
|
||||
"limit": 4.82,
|
||||
"reason": "回调支撑买入"
|
||||
},
|
||||
"priority": 1,
|
||||
@@ -716,17 +716,17 @@
|
||||
{
|
||||
"code": "002594",
|
||||
"name": "比亚迪",
|
||||
"price": 82.9,
|
||||
"price": 82.85,
|
||||
"cost": 0,
|
||||
"shares": 0,
|
||||
"avg_price": 0,
|
||||
"action": "盈利持有 | 目标92.51 | 止损80.41 | 买入区81.24~84.56 | 信号:观望",
|
||||
"stop_loss": 80.41,
|
||||
"entry_low": 81.24,
|
||||
"entry_high": 84.56,
|
||||
"tech_snapshot": "形态:光头光脚阴线/bearish 量价:主动卖盘占优 强撑:76.5 弱撑:82.29 弱压:85.0 强压:92.51",
|
||||
"action": "盈利持有 | 目标92.53 | 止损80.36 | 买入区81.19~84.51 | 信号:观望",
|
||||
"stop_loss": 80.36,
|
||||
"entry_low": 81.19,
|
||||
"entry_high": 84.51,
|
||||
"tech_snapshot": "形态:光头光脚阴线/bearish 量价:主动卖盘占优 强撑:76.5 弱撑:82.22 弱压:85.0 强压:92.53",
|
||||
"timing_signal": "观望",
|
||||
"rr_ratio": 3.86,
|
||||
"rr_ratio": 3.89,
|
||||
"status": "updated",
|
||||
"note": "",
|
||||
"timestamp": "2026-06-24 09:00",
|
||||
@@ -738,7 +738,7 @@
|
||||
"position_advice": "减仓或观望",
|
||||
"time_horizon": "观望",
|
||||
"created_at": "2026-06-18 17:15",
|
||||
"take_profit": 92.51,
|
||||
"take_profit": 92.53,
|
||||
"updated_reason": "技术信号变化: 大盘中性,行业偏弱,蓝筹,放量下跌,等企稳再入: 止损83.36→79.15 | 形态:带上影阴线/bearish 量价:主动卖盘占优 强撑:78.83 弱撑:83.73 弱压:87.59 强压:93.",
|
||||
"changelog": [
|
||||
{
|
||||
@@ -824,7 +824,7 @@
|
||||
{
|
||||
"id": "002594_stop_loss",
|
||||
"condition": {
|
||||
"price": "<80.41"
|
||||
"price": "<80.36"
|
||||
},
|
||||
"action": {
|
||||
"type": "sell",
|
||||
@@ -841,13 +841,13 @@
|
||||
"id": "002594_buy_dip",
|
||||
"condition": {
|
||||
"scenario": "weak_consolidation",
|
||||
"price": "<=84.56",
|
||||
"price_lower": ">=81.24"
|
||||
"price": "<=84.51",
|
||||
"price_lower": ">=81.19"
|
||||
},
|
||||
"action": {
|
||||
"type": "buy",
|
||||
"amount": "normal",
|
||||
"limit": 81.24,
|
||||
"limit": 81.19,
|
||||
"reason": "回调支撑买入"
|
||||
},
|
||||
"priority": 1,
|
||||
@@ -860,7 +860,7 @@
|
||||
"id": "002594_breakout_chase",
|
||||
"condition": {
|
||||
"scenario": "bullish_recovery",
|
||||
"price": ">=92.51"
|
||||
"price": ">=92.53"
|
||||
},
|
||||
"action": {
|
||||
"type": "buy",
|
||||
@@ -894,7 +894,7 @@
|
||||
{
|
||||
"id": "002594_take_profit",
|
||||
"condition": {
|
||||
"price": ">=92.51"
|
||||
"price": ">=92.53"
|
||||
},
|
||||
"action": {
|
||||
"type": "sell",
|
||||
@@ -4906,17 +4906,17 @@
|
||||
{
|
||||
"code": "300124",
|
||||
"name": "汇川技术",
|
||||
"price": 66.08,
|
||||
"price": 66.14,
|
||||
"cost": 0,
|
||||
"shares": 0,
|
||||
"avg_price": 0,
|
||||
"action": "盈利持有 | 目标72.94 | 止损64.1 | 买入区64.76~67.4 | 信号:观望",
|
||||
"stop_loss": 64.1,
|
||||
"entry_low": 64.76,
|
||||
"entry_high": 67.4,
|
||||
"tech_snapshot": "形态:带上影阴线/bearish 量价:主动卖盘占优 强撑:60.06 弱撑:65.5 弱压:67.07 强压:72.94",
|
||||
"action": "盈利持有 | 目标72.96 | 止损64.16 | 买入区64.82~67.46 | 信号:观望",
|
||||
"stop_loss": 64.16,
|
||||
"entry_low": 64.82,
|
||||
"entry_high": 67.46,
|
||||
"tech_snapshot": "形态:带上影阴线/bearish 量价:主动卖盘占优 强撑:60.08 弱撑:65.54 弱压:67.11 强压:72.96",
|
||||
"timing_signal": "观望",
|
||||
"rr_ratio": 3.46,
|
||||
"rr_ratio": 3.44,
|
||||
"status": "updated",
|
||||
"note": "",
|
||||
"timestamp": "2026-06-24 09:01",
|
||||
@@ -4928,7 +4928,7 @@
|
||||
"position_advice": "减仓或观望",
|
||||
"time_horizon": "观望",
|
||||
"created_at": "2026-06-18 17:15",
|
||||
"take_profit": 72.94,
|
||||
"take_profit": 72.96,
|
||||
"updated_reason": "技术面重评: 止损65.78→64.82 | 形态:光头光脚阴线/bearish 量价:主动卖盘占优 强撑:61.61 弱撑:65.99 弱压:68.95 强压:73",
|
||||
"changelog": [
|
||||
{
|
||||
@@ -5007,7 +5007,7 @@
|
||||
{
|
||||
"id": "300124_stop_loss",
|
||||
"condition": {
|
||||
"price": "<64.1"
|
||||
"price": "<64.16"
|
||||
},
|
||||
"action": {
|
||||
"type": "sell",
|
||||
@@ -5024,13 +5024,13 @@
|
||||
"id": "300124_buy_dip",
|
||||
"condition": {
|
||||
"scenario": "weak_consolidation",
|
||||
"price": "<=67.4",
|
||||
"price_lower": ">=64.76"
|
||||
"price": "<=67.46",
|
||||
"price_lower": ">=64.82"
|
||||
},
|
||||
"action": {
|
||||
"type": "buy",
|
||||
"amount": "normal",
|
||||
"limit": 64.76,
|
||||
"limit": 64.82,
|
||||
"reason": "回调支撑买入"
|
||||
},
|
||||
"priority": 1,
|
||||
@@ -5043,7 +5043,7 @@
|
||||
"id": "300124_breakout_chase",
|
||||
"condition": {
|
||||
"scenario": "bullish_recovery",
|
||||
"price": ">=72.94"
|
||||
"price": ">=72.96"
|
||||
},
|
||||
"action": {
|
||||
"type": "buy",
|
||||
@@ -5077,7 +5077,7 @@
|
||||
{
|
||||
"id": "300124_take_profit",
|
||||
"condition": {
|
||||
"price": ">=72.94"
|
||||
"price": ">=72.96"
|
||||
},
|
||||
"action": {
|
||||
"type": "sell",
|
||||
@@ -7931,17 +7931,17 @@
|
||||
{
|
||||
"code": "688795",
|
||||
"name": "摩尔线程-U",
|
||||
"price": 679.11,
|
||||
"price": 678.1,
|
||||
"cost": 0,
|
||||
"shares": 0,
|
||||
"avg_price": 0,
|
||||
"action": "盈利持有 | 目标817.02 | 止损658.74 | 买入区665.53~692.69 | 信号:观望",
|
||||
"stop_loss": 658.74,
|
||||
"entry_low": 665.53,
|
||||
"entry_high": 692.69,
|
||||
"tech_snapshot": "形态:带下影阴线/neutral 量价:主动卖盘占优 强撑:563.22 弱撑:665.74 弱压:704.03 强压:817.02",
|
||||
"action": "盈利持有 | 目标816.68 | 止损657.76 | 买入区664.54~691.66 | 信号:观望",
|
||||
"stop_loss": 657.76,
|
||||
"entry_low": 664.54,
|
||||
"entry_high": 691.66,
|
||||
"tech_snapshot": "形态:带下影阴线/neutral 量价:主动卖盘占优 强撑:563.22 弱撑:665.07 弱压:704.03 强压:816.68",
|
||||
"timing_signal": "观望",
|
||||
"rr_ratio": 6.77,
|
||||
"rr_ratio": 6.81,
|
||||
"status": "updated",
|
||||
"note": "",
|
||||
"timestamp": "2026-06-24 09:01",
|
||||
@@ -7953,7 +7953,7 @@
|
||||
"position_advice": "正常配置",
|
||||
"time_horizon": "数月~1年",
|
||||
"created_at": "2026-06-18 17:15",
|
||||
"take_profit": 817.02,
|
||||
"take_profit": 816.68,
|
||||
"updated_reason": "技术信号变化: 大盘中性,行业中性,高估值,放量下跌,等企稳再入: 止损683.91→660.96 | 形态:带上影阳线/neutral 量价:主动卖盘占优 强撑:568.43 弱撑:660.96 弱压:746.15 强压:",
|
||||
"changelog": [
|
||||
{
|
||||
@@ -8032,7 +8032,7 @@
|
||||
{
|
||||
"id": "688795_stop_loss",
|
||||
"condition": {
|
||||
"price": "<658.74"
|
||||
"price": "<657.76"
|
||||
},
|
||||
"action": {
|
||||
"type": "sell",
|
||||
@@ -8049,13 +8049,13 @@
|
||||
"id": "688795_buy_dip",
|
||||
"condition": {
|
||||
"scenario": "weak_consolidation",
|
||||
"price": "<=692.69",
|
||||
"price_lower": ">=665.53"
|
||||
"price": "<=691.66",
|
||||
"price_lower": ">=664.54"
|
||||
},
|
||||
"action": {
|
||||
"type": "buy",
|
||||
"amount": "normal",
|
||||
"limit": 665.53,
|
||||
"limit": 664.54,
|
||||
"reason": "回调支撑买入"
|
||||
},
|
||||
"priority": 1,
|
||||
@@ -8068,7 +8068,7 @@
|
||||
"id": "688795_breakout_chase",
|
||||
"condition": {
|
||||
"scenario": "bullish_recovery",
|
||||
"price": ">=817.02"
|
||||
"price": ">=816.68"
|
||||
},
|
||||
"action": {
|
||||
"type": "buy",
|
||||
@@ -8102,7 +8102,7 @@
|
||||
{
|
||||
"id": "688795_take_profit",
|
||||
"condition": {
|
||||
"price": ">=817.02"
|
||||
"price": ">=816.68"
|
||||
},
|
||||
"action": {
|
||||
"type": "sell",
|
||||
@@ -8662,5 +8662,5 @@
|
||||
}
|
||||
],
|
||||
"total": 43,
|
||||
"regenerated_at": "2026-06-24 10:51"
|
||||
"regenerated_at": "2026-06-24 10:53"
|
||||
}
|
||||
+34
-34
@@ -26,8 +26,8 @@
|
||||
"action_note": "⚠️盈亏比偏低(1:1.2),不建议加仓",
|
||||
"timing_signal": "大盘中性,行业偏弱,蓝筹,持有"
|
||||
},
|
||||
"price": 416.2,
|
||||
"change_pct": 0.34
|
||||
"price": 417.4,
|
||||
"change_pct": 0.53
|
||||
},
|
||||
{
|
||||
"code": "00981",
|
||||
@@ -55,8 +55,8 @@
|
||||
"action_note": "⚠️盈亏比偏低(1:1.3),不建议加仓",
|
||||
"timing_signal": "大盘中性,行业中性,高估值,蓝筹,持有"
|
||||
},
|
||||
"price": 83.9,
|
||||
"change_pct": 7.77
|
||||
"price": 83.35,
|
||||
"change_pct": 7.13
|
||||
},
|
||||
{
|
||||
"code": "01088",
|
||||
@@ -84,8 +84,8 @@
|
||||
"action_note": "⚠️盈亏比偏低(1:1.2),不建议加仓",
|
||||
"timing_signal": "大盘中性,行业中性,蓝筹,持有"
|
||||
},
|
||||
"price": 41.38,
|
||||
"change_pct": -1.62
|
||||
"price": 41.46,
|
||||
"change_pct": -1.38
|
||||
},
|
||||
{
|
||||
"code": "01211",
|
||||
@@ -113,8 +113,8 @@
|
||||
"action_note": "深套持有",
|
||||
"timing_signal": "大盘中性,行业偏弱,蓝筹,持有"
|
||||
},
|
||||
"price": 74.95,
|
||||
"change_pct": -1.19
|
||||
"price": 75.0,
|
||||
"change_pct": -1.12
|
||||
},
|
||||
{
|
||||
"code": "01478",
|
||||
@@ -171,8 +171,8 @@
|
||||
"action_note": "短炒强趋势持",
|
||||
"timing_signal": "大盘中性,行业偏弱,高估值,强趋势持"
|
||||
},
|
||||
"price": 96.35,
|
||||
"change_pct": 10.43
|
||||
"price": 95.9,
|
||||
"change_pct": 10.03
|
||||
},
|
||||
{
|
||||
"code": "02202",
|
||||
@@ -258,8 +258,8 @@
|
||||
"action_note": "深套持有",
|
||||
"timing_signal": "大盘中性,行业偏弱,蓝筹,持有"
|
||||
},
|
||||
"price": 98.2,
|
||||
"change_pct": -0.76
|
||||
"price": 98.25,
|
||||
"change_pct": -0.71
|
||||
},
|
||||
{
|
||||
"code": "300035",
|
||||
@@ -287,8 +287,8 @@
|
||||
"action_note": "深套持有",
|
||||
"timing_signal": "大盘中性,行业偏弱,持有"
|
||||
},
|
||||
"price": 16.03,
|
||||
"change_pct": -2.02
|
||||
"price": 16.05,
|
||||
"change_pct": -1.83
|
||||
},
|
||||
{
|
||||
"code": "300548",
|
||||
@@ -316,8 +316,8 @@
|
||||
"action_note": "短炒强趋势持",
|
||||
"timing_signal": "大盘中性,行业中性,高估值,强趋势持"
|
||||
},
|
||||
"price": 278.6,
|
||||
"change_pct": -2.59
|
||||
"price": 279.51,
|
||||
"change_pct": -2.2
|
||||
},
|
||||
{
|
||||
"code": "300690",
|
||||
@@ -345,8 +345,8 @@
|
||||
"action_note": "⚠️盈亏比偏低(1:1.5),不建议加仓",
|
||||
"timing_signal": "大盘中性,行业偏弱,持有"
|
||||
},
|
||||
"price": 22.73,
|
||||
"change_pct": -3.81
|
||||
"price": 22.75,
|
||||
"change_pct": -3.72
|
||||
},
|
||||
{
|
||||
"code": "300750",
|
||||
@@ -374,8 +374,8 @@
|
||||
"action_note": "",
|
||||
"timing_signal": "大盘中性,行业偏弱,蓝筹,持有"
|
||||
},
|
||||
"price": 390.09,
|
||||
"change_pct": -0.62
|
||||
"price": 390.13,
|
||||
"change_pct": -0.6
|
||||
},
|
||||
{
|
||||
"code": "518880",
|
||||
@@ -403,8 +403,8 @@
|
||||
"action_note": "深套持有",
|
||||
"timing_signal": "大盘中性,行业偏弱,持有"
|
||||
},
|
||||
"price": 8.44,
|
||||
"change_pct": -1.15
|
||||
"price": 8.45,
|
||||
"change_pct": -1.0
|
||||
},
|
||||
{
|
||||
"code": "600036",
|
||||
@@ -432,8 +432,8 @@
|
||||
"action_note": "⚠️盈亏比偏低(1:1.2),不建议加仓",
|
||||
"timing_signal": "大盘中性,行业偏强,低估值,蓝筹,弱势持有"
|
||||
},
|
||||
"price": 37.13,
|
||||
"change_pct": -0.72
|
||||
"price": 37.05,
|
||||
"change_pct": -0.96
|
||||
},
|
||||
{
|
||||
"code": "600563",
|
||||
@@ -461,8 +461,8 @@
|
||||
"action_note": "",
|
||||
"timing_signal": "大盘中性,行业偏弱,持有"
|
||||
},
|
||||
"price": 175.58,
|
||||
"change_pct": 8.02
|
||||
"price": 177.0,
|
||||
"change_pct": 8.91
|
||||
},
|
||||
{
|
||||
"code": "600739",
|
||||
@@ -519,8 +519,8 @@
|
||||
"action_note": "深套持有",
|
||||
"timing_signal": "大盘中性,行业偏弱,低估值,蓝筹,持有"
|
||||
},
|
||||
"price": 27.34,
|
||||
"change_pct": -1.48
|
||||
"price": 27.4,
|
||||
"change_pct": -1.3
|
||||
},
|
||||
{
|
||||
"code": "603259",
|
||||
@@ -548,8 +548,8 @@
|
||||
"action_note": "",
|
||||
"timing_signal": "大盘中性,行业偏强,低估值,持有"
|
||||
},
|
||||
"price": 116.18,
|
||||
"change_pct": 9.28
|
||||
"price": 116.22,
|
||||
"change_pct": 9.12
|
||||
},
|
||||
{
|
||||
"code": "688411",
|
||||
@@ -577,8 +577,8 @@
|
||||
"action_note": "",
|
||||
"timing_signal": "持有"
|
||||
},
|
||||
"price": 264.25,
|
||||
"change_pct": -2.93
|
||||
"price": 264.53,
|
||||
"change_pct": -2.83
|
||||
},
|
||||
{
|
||||
"code": "688981",
|
||||
@@ -606,8 +606,8 @@
|
||||
"action_note": "",
|
||||
"timing_signal": "大盘中性,行业中性,高估值,蓝筹,持有"
|
||||
},
|
||||
"price": 148.8,
|
||||
"change_pct": 5.01
|
||||
"price": 149.31,
|
||||
"change_pct": 5.3
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -107,8 +107,8 @@
|
||||
{
|
||||
"date": "2026-06-24",
|
||||
"high": 88.32,
|
||||
"low": 82.89,
|
||||
"close": 82.9
|
||||
"low": 82.83,
|
||||
"close": 82.85
|
||||
}
|
||||
],
|
||||
"00700": [
|
||||
@@ -1284,7 +1284,7 @@
|
||||
"date": "2026-06-24",
|
||||
"high": 68.8,
|
||||
"low": 65.92,
|
||||
"close": 66.08
|
||||
"close": 66.14
|
||||
}
|
||||
],
|
||||
"300548": [
|
||||
@@ -2316,7 +2316,7 @@
|
||||
"date": "2026-06-24",
|
||||
"high": 745.2,
|
||||
"low": 660.01,
|
||||
"close": 679.11
|
||||
"close": 678.1
|
||||
}
|
||||
],
|
||||
"688802": [
|
||||
@@ -2466,7 +2466,7 @@
|
||||
"date": "2026-06-24",
|
||||
"high": 5.38,
|
||||
"low": 4.86,
|
||||
"close": 4.91
|
||||
"close": 4.92
|
||||
}
|
||||
],
|
||||
"688630": [
|
||||
|
||||
@@ -343,8 +343,8 @@ def main():
|
||||
budget = min(ideal_budget, max_use_cash, available_cash)
|
||||
lots = int(budget / lot_cost) if lot_cost > 0 else 0
|
||||
|
||||
if lots == 0 and lot_cost > 0 and budget > lot_cost * 0.5:
|
||||
# 预算超过半手 → 至少1手
|
||||
if lots == 0 and lot_cost > 0 and budget > lot_cost * 0.8:
|
||||
# 预算覆盖超过80%的1手金额 → 至少1手(仅差一档)
|
||||
lots = 1
|
||||
|
||||
lot_cost_total = lots * lot_cost
|
||||
|
||||
Reference in New Issue
Block a user