mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
grid2: fix order shifting
This commit is contained in:
parent
efcfcf7c18
commit
8d78399335
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user