a
This commit is contained in:
parent
ff3775eada
commit
2e23d66af1
|
|
@ -163,17 +163,6 @@ class PositionManager:
|
|||
atr=atr
|
||||
)
|
||||
|
||||
<<<<<<< Current (Your changes)
|
||||
# 计算止盈(基于保证金)
|
||||
# 优先使用配置的止盈百分比,如果没有配置则使用止损的2倍
|
||||
take_profit_pct_margin = self.risk_manager.config.get('TAKE_PROFIT_PERCENT', 0.15)
|
||||
# 如果配置中没有设置止盈,则使用止损的2倍作为默认
|
||||
if take_profit_pct_margin is None or take_profit_pct_margin == 0:
|
||||
take_profit_pct_margin = stop_loss_pct_margin * 2.0
|
||||
take_profit_price = self.risk_manager.get_take_profit_price(
|
||||
entry_price, side, quantity, leverage,
|
||||
take_profit_pct=take_profit_pct_margin
|
||||
=======
|
||||
# 计算止盈(基于保证金,支持ATR动态止盈)
|
||||
# 优先使用配置的止盈百分比,如果没有配置则使用止损的3倍(盈亏比3:1)
|
||||
take_profit_pct_margin = self.risk_manager.config.get('TAKE_PROFIT_PERCENT', 0.30)
|
||||
|
|
@ -184,7 +173,6 @@ class PositionManager:
|
|||
entry_price, side, quantity, leverage,
|
||||
take_profit_pct=take_profit_pct_margin,
|
||||
atr=atr # 传递ATR用于动态止盈
|
||||
>>>>>>> Incoming (Background Agent changes)
|
||||
)
|
||||
|
||||
# 下单
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user