动态步长-fix

This commit is contained in:
zhangkun9038@dingtalk.com 2025-11-27 16:41:53 +08:00
parent 5987112187
commit 6d7225e39d

View File

@ -155,8 +155,13 @@ class GridManager:
if current_price < self.lowest_price:
self.lowest_price = current_price
# 统计网格状态
filled_count = sum(1 for gs in self.grid_states.values() if gs.status == "filled")
empty_count = len(self.grid_states) - filled_count
print(f"[GridManager] {self.pair} 状态更新 - 价格: {current_price:.2f}, "
f"持仓: {self.total_quantity:.6f}, 平均价: {self.avg_entry_price:.2f}",
f"持仓: {self.total_quantity:.6f}, 平均价: {self.avg_entry_price:.2f}, "
f"网格状态: {filled_count} FILLED / {empty_count} EMPTY",
file=sys.stderr, flush=True)
def apply_adjustment(self, adjustment: PositionRecord) -> None: