diff --git a/pkg/strategy/grid2/strategy.go b/pkg/strategy/grid2/strategy.go index b2ac9f3ff..46509a4f3 100644 --- a/pkg/strategy/grid2/strategy.go +++ b/pkg/strategy/grid2/strategy.go @@ -1287,7 +1287,9 @@ func (s *Strategy) recoverGridWithOpenOrders(ctx context.Context, historyService s.setGrid(grid) s.EmitGridReady() - for _, o := range filledOrders { + for i := range filledOrders { + // avoid using the iterator + o := filledOrders[i] s.processFilledOrder(o) time.Sleep(100 * time.Millisecond) }