This commit is contained in:
aaron 2026-03-30 07:54:47 +08:00
parent 41af98e48b
commit 95d4aff091

View File

@ -1574,15 +1574,21 @@ class CryptoAgent:
if take_profit:
content_parts.append(f"🎯 **止盈价**: ${take_profit}")
# 简洁的决策理由和风险分析各1句话
content_parts.append(f"")
content_parts.append(f"📝 **决策**: {reasoning}")
# 决策理由和风险分析(挂单中不显示,等成交后再显示)
is_pending = (hl_order_status == 'resting') or \
(entry_type == 'limit' and decision_type in ['OPEN', 'ADD'])
if not is_pending:
content_parts.append(f"")
content_parts.append(f"📝 **决策**: {reasoning}")
if risk_analysis:
content_parts.append(f"⚠️ **风险**: {risk_analysis}")
if risk_analysis:
content_parts.append(f"⚠️ **风险**: {risk_analysis}")
content_parts.append(f"")
content_parts.append(f"💼 交易已执行")
if is_pending:
content_parts.append(f"⏳ 等待成交")
else:
content_parts.append(f"💼 交易已执行")
content = "\n".join(content_parts)
@ -2457,11 +2463,11 @@ class CryptoAgent:
if not passed:
logger.info(f" ❌ 风控未通过: {reason}")
return {
**signal,
"decision": "HOLD",
"action": "IGNORE",
"reason": reason,
"reasoning": reason,
**signal
}
# 2. 处理同向订单
@ -2470,11 +2476,11 @@ class CryptoAgent:
if same_action in ["IGNORE", "HOLD", "WAIT"]:
logger.info(f" {same_action}: {same_reason}")
return {
**signal,
"decision": "HOLD",
"action": same_action,
"reason": same_reason,
"reasoning": same_reason,
**signal
}
# 3. 处理反向订单