grid2: fix order shifting

This commit is contained in:
c9s 2022-12-04 19:48:12 +08:00
parent efcfcf7c18
commit 8d78399335

View File

@ -651,7 +651,8 @@ func (s *Strategy) openGrid(ctx context.Context, session *bbgo.ExchangeSession)
usedBase = usedBase.Add(quantity)
} else if i > 0 {
// next price
nextPin := pins[i-1]
i--
nextPin := pins[i]
nextPrice := fixedpoint.Value(nextPin)
submitOrders = append(submitOrders, types.SubmitOrder{
Symbol: s.Symbol,