From ad1e999f8296127c87e44ac79fc91168dd3c5f2d Mon Sep 17 00:00:00 2001 From: aaron <> Date: Wed, 25 Feb 2026 22:35:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E7=BA=A7=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/crypto_agent/crypto_agent.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/backend/app/crypto_agent/crypto_agent.py b/backend/app/crypto_agent/crypto_agent.py index c994d40..a0f99ba 100644 --- a/backend/app/crypto_agent/crypto_agent.py +++ b/backend/app/crypto_agent/crypto_agent.py @@ -842,30 +842,34 @@ class CryptoAgent: entry_type_text = '现价入场' if entry_type == 'market' else '挂单等待' entry_type_icon = '⚡' if entry_type == 'market' else '⏳' - # 等级(基于信心度映射) - if confidence >= 85: + # 等级(基于信心度映射)- 与 market_signal_analyzer.py 保持一致 + # A级(80-100): 量价配合 + 多指标共振 + 多周期确认 + # B级(60-79): 量价配合 + 主要指标确认 + # C级(40-59): 有机会但量价不够理想 + # D级(<40): 量价背离或信号矛盾 + if confidence >= 80: grade = 'A' grade_icon = '⭐⭐⭐' - elif confidence >= 75: + elif confidence >= 60: grade = 'B' grade_icon = '⭐⭐' - elif confidence >= 60: + elif confidence >= 40: grade = 'C' grade_icon = '⭐' else: grade = 'D' grade_icon = '' - # 仓位(基于信心度和杠杆空间) - if confidence >= 80: + # 仓位(基于信心度和杠杆空间)- 与新的等级阈值对齐 + if confidence >= 80: # A级信号 position_size = 'heavy' position_icon = '🔥' position_text = '重仓' - elif confidence >= 70: + elif confidence >= 60: # B级信号 position_size = 'medium' position_icon = '📊' position_text = '中仓' - else: + else: # C级或D级信号 position_size = 'light' position_icon = '🌱' position_text = '轻仓'