mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
grid2: add order group id to the submitOrder forms
This commit is contained in:
parent
773b055711
commit
9f29fbd645
|
@ -476,6 +476,7 @@ func (s *Strategy) processFilledOrder(o types.Order) {
|
|||
TimeInForce: types.TimeInForceGTC,
|
||||
Quantity: newQuantity,
|
||||
Tag: orderTag,
|
||||
GroupID: s.OrderGroupID,
|
||||
}
|
||||
|
||||
s.logger.Infof("SUBMIT GRID REVERSE ORDER: %s", orderForm.String())
|
||||
|
@ -1176,6 +1177,7 @@ func (s *Strategy) generateGridOrders(totalQuote, totalBase, lastPrice fixedpoin
|
|||
Market: s.Market,
|
||||
TimeInForce: types.TimeInForceGTC,
|
||||
Tag: orderTag,
|
||||
GroupID: s.OrderGroupID,
|
||||
})
|
||||
usedBase = usedBase.Add(quantity)
|
||||
} else {
|
||||
|
@ -1192,6 +1194,7 @@ func (s *Strategy) generateGridOrders(totalQuote, totalBase, lastPrice fixedpoin
|
|||
Market: s.Market,
|
||||
TimeInForce: types.TimeInForceGTC,
|
||||
Tag: orderTag,
|
||||
GroupID: s.OrderGroupID,
|
||||
})
|
||||
quoteQuantity := quantity.Mul(nextPrice)
|
||||
usedQuote = usedQuote.Add(quoteQuantity)
|
||||
|
@ -1224,6 +1227,7 @@ func (s *Strategy) generateGridOrders(totalQuote, totalBase, lastPrice fixedpoin
|
|||
Market: s.Market,
|
||||
TimeInForce: types.TimeInForceGTC,
|
||||
Tag: orderTag,
|
||||
GroupID: s.OrderGroupID,
|
||||
})
|
||||
usedQuote = usedQuote.Add(quoteQuantity)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user