集成pointer_index自动更新到update_state方法 - 价格变化时自动调整指针位置
This commit is contained in:
parent
675b51237d
commit
0a47e57d3b
@ -285,7 +285,13 @@ class GridManager:
|
||||
if current_price < self.lowest_price:
|
||||
self.lowest_price = current_price
|
||||
|
||||
# 统计网格状态
|
||||
# ✅ 自动更新 pointer_index(根据价格变化)
|
||||
move_steps = self.update_pointer_by_price(current_price)
|
||||
if move_steps != 0:
|
||||
print(f"[GridManager] {self.pair} 指针自动移动 {move_steps} 步",
|
||||
file=sys.stderr, flush=True)
|
||||
|
||||
# ... existing code ...
|
||||
filled_count = sum(1 for gs in self.grid_states.values() if gs.status == "filled")
|
||||
empty_count = len(self.grid_states) - filled_count
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user