改进盈亏统计面板触发条件 - 只要有持仓就输出(便于调试和显示)
This commit is contained in:
parent
b466b80308
commit
7c4a44d404
@ -132,9 +132,9 @@ class StaticGrid(IStrategy):
|
||||
# 更新网格管理器状态
|
||||
grid_manager.update_state(current_price, candle_index)
|
||||
|
||||
# ✅ 定期报告 - 每5分钟输出盈亏统计面板
|
||||
# 1小时K线下,5分钟 ≈ 5个蜡烛线(用300来近似)
|
||||
if candle_index % 5 == 0:
|
||||
# ✅ 定期报告 - 每次加仓时或每5分钟输出盈亏统计面板
|
||||
# 只要有持仓就定期输出(便于调试)
|
||||
if grid_manager.total_quantity > 0 or candle_index % 5 == 0:
|
||||
self._print_pnl_panel(pair, grid_manager)
|
||||
|
||||
return dataframe
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user