1
This commit is contained in:
parent
3729b2de1e
commit
d30b22f0ac
@ -994,22 +994,33 @@ class CryptoAgent:
|
||||
action_icon = '➖'
|
||||
action_text = action
|
||||
|
||||
# 从市场信号中获取入场方式(需要在构建标题之前)
|
||||
best_signal = self._get_best_signal_from_market(market_signal)
|
||||
entry_type = best_signal.get('entry_type', 'market') if best_signal else 'market'
|
||||
entry_type_text = '现价单' if entry_type == 'market' else '挂单'
|
||||
entry_type_icon = '⚡' if entry_type == 'market' else '⏳'
|
||||
|
||||
# 仓位图标
|
||||
position_map = {'heavy': '🔥 重仓', 'medium': '📊 中仓', 'light': '🌱 轻仓'}
|
||||
position_display = position_map.get(position_size, '🌱 轻仓')
|
||||
|
||||
# 构建卡片标题和颜色
|
||||
# 构建卡片标题和颜色 - 考虑入场方式
|
||||
# 挂单时标题显示"挂单",现价单时显示"开仓"/"平仓"等
|
||||
if decision_type == 'OPEN':
|
||||
title = f"{account_type} {symbol} {decision_text}"
|
||||
decision_title = '挂单' if entry_type == 'limit' else '开仓'
|
||||
title = f"{account_type} {symbol} {decision_title}"
|
||||
color = "green"
|
||||
elif decision_type == 'CLOSE':
|
||||
title = f"{account_type} {symbol} {decision_text}"
|
||||
decision_title = '挂单' if entry_type == 'limit' else '平仓'
|
||||
title = f"{account_type} {symbol} {decision_title}"
|
||||
color = "orange"
|
||||
elif decision_type == 'ADD':
|
||||
title = f"{account_type} {symbol} {decision_text}"
|
||||
decision_title = '挂单' if entry_type == 'limit' else '加仓'
|
||||
title = f"{account_type} {symbol} {decision_title}"
|
||||
color = "green"
|
||||
elif decision_type == 'REDUCE':
|
||||
title = f"{account_type} {symbol} {decision_text}"
|
||||
decision_title = '挂单' if entry_type == 'limit' else '减仓'
|
||||
title = f"{account_type} {symbol} {decision_title}"
|
||||
color = "orange"
|
||||
else:
|
||||
title = f"{account_type} {symbol} 交易执行"
|
||||
@ -1022,12 +1033,6 @@ class CryptoAgent:
|
||||
position_value = margin * leverage if isinstance(margin, (int, float)) else 'N/A'
|
||||
position_value_display = f"${position_value:,.2f}" if isinstance(position_value, (int, float)) else "N/A"
|
||||
|
||||
# 从市场信号中获取入场方式
|
||||
best_signal = self._get_best_signal_from_market(market_signal)
|
||||
entry_type = best_signal.get('entry_type', 'market') if best_signal else 'market'
|
||||
entry_type_text = '现价单' if entry_type == 'market' else '挂单等待'
|
||||
entry_type_icon = '⚡' if entry_type == 'market' else '⏳'
|
||||
|
||||
# 根据入场方式显示不同的价格信息
|
||||
if entry_type == 'market':
|
||||
price_display = f"💵 **入场价**: ${current_price:,.2f} (现价)"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user