mirror of
https://github.com/silencesdg/mt5_python_ea_suite.git
synced 2026-07-28 11:17:43 +00:00
fix: 补回误删的 initial_capital + 日志显示有效杠杆缩放值
This commit is contained in:
@@ -62,6 +62,11 @@ class PositionManager:
|
||||
self.take_profit_pct = risk.get("take_profit_pct", 0.20) * self._lev_ratio
|
||||
self.min_profit_for_time_exit = risk.get("min_profit_for_time_exit", 0.001) * self._lev_ratio
|
||||
|
||||
# 资金管理
|
||||
self.initial_capital = INITIAL_CAPITAL
|
||||
self.long_capital_pct = CAPITAL_ALLOCATION.get("long_pct", 0.5)
|
||||
self.short_capital_pct = CAPITAL_ALLOCATION.get("short_pct", 0.5)
|
||||
|
||||
# 持仓和交易记录
|
||||
self.positions = []
|
||||
self.closed_trades = []
|
||||
|
||||
Reference in New Issue
Block a user