1
This commit is contained in:
parent
41af98e48b
commit
95d4aff091
@ -1574,15 +1574,21 @@ class CryptoAgent:
|
|||||||
if take_profit:
|
if take_profit:
|
||||||
content_parts.append(f"🎯 **止盈价**: ${take_profit}")
|
content_parts.append(f"🎯 **止盈价**: ${take_profit}")
|
||||||
|
|
||||||
# 简洁的决策理由和风险分析(各1句话)
|
# 决策理由和风险分析(挂单中不显示,等成交后再显示)
|
||||||
content_parts.append(f"")
|
is_pending = (hl_order_status == 'resting') or \
|
||||||
content_parts.append(f"📝 **决策**: {reasoning}")
|
(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:
|
if risk_analysis:
|
||||||
content_parts.append(f"⚠️ **风险**: {risk_analysis}")
|
content_parts.append(f"⚠️ **风险**: {risk_analysis}")
|
||||||
|
|
||||||
content_parts.append(f"")
|
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)
|
content = "\n".join(content_parts)
|
||||||
|
|
||||||
@ -2457,11 +2463,11 @@ class CryptoAgent:
|
|||||||
if not passed:
|
if not passed:
|
||||||
logger.info(f" ❌ 风控未通过: {reason}")
|
logger.info(f" ❌ 风控未通过: {reason}")
|
||||||
return {
|
return {
|
||||||
|
**signal,
|
||||||
"decision": "HOLD",
|
"decision": "HOLD",
|
||||||
"action": "IGNORE",
|
"action": "IGNORE",
|
||||||
"reason": reason,
|
"reason": reason,
|
||||||
"reasoning": reason,
|
"reasoning": reason,
|
||||||
**signal
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# 2. 处理同向订单
|
# 2. 处理同向订单
|
||||||
@ -2470,11 +2476,11 @@ class CryptoAgent:
|
|||||||
if same_action in ["IGNORE", "HOLD", "WAIT"]:
|
if same_action in ["IGNORE", "HOLD", "WAIT"]:
|
||||||
logger.info(f" {same_action}: {same_reason}")
|
logger.info(f" {same_action}: {same_reason}")
|
||||||
return {
|
return {
|
||||||
|
**signal,
|
||||||
"decision": "HOLD",
|
"decision": "HOLD",
|
||||||
"action": same_action,
|
"action": same_action,
|
||||||
"reason": same_reason,
|
"reason": same_reason,
|
||||||
"reasoning": same_reason,
|
"reasoning": same_reason,
|
||||||
**signal
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# 3. 处理反向订单
|
# 3. 处理反向订单
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user