diff --git a/pkg/strategy/grid2/grid.go b/pkg/strategy/grid2/grid.go index 20aa541b2..539c134dd 100644 --- a/pkg/strategy/grid2/grid.go +++ b/pkg/strategy/grid2/grid.go @@ -60,11 +60,15 @@ func NewGrid(lower, upper, size, tickSize fixedpoint.Value) *Grid { Spread: spread, } - var pins = calculateArithmeticPins(lower, upper, spread, tickSize) - grid.addPins(pins) + grid.CalculatePins() return grid } +func (g *Grid) CalculatePins() { + var pins = calculateArithmeticPins(g.LowerPrice, g.UpperPrice, g.Spread, g.TickSize) + g.addPins(pins) +} + func (g *Grid) Height() fixedpoint.Value { return g.UpperPrice.Sub(g.LowerPrice) }