mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
grid2: pull out order tag
This commit is contained in:
parent
aa4130ed30
commit
16df170ca3
|
@ -17,6 +17,8 @@ import (
|
|||
|
||||
const ID = "grid2"
|
||||
|
||||
const orderTag = "grid2"
|
||||
|
||||
var log = logrus.WithField("strategy", ID)
|
||||
|
||||
var maxNumberOfOrderTradesQueryTries = 10
|
||||
|
@ -366,7 +368,7 @@ func (s *Strategy) processFilledOrder(o types.Order) {
|
|||
Side: newSide,
|
||||
TimeInForce: types.TimeInForceGTC,
|
||||
Quantity: newQuantity,
|
||||
Tag: "grid",
|
||||
Tag: orderTag,
|
||||
}
|
||||
|
||||
s.logger.Infof("SUBMIT GRID REVERSE ORDER: %s", orderForm.String())
|
||||
|
@ -899,7 +901,7 @@ func (s *Strategy) generateGridOrders(totalQuote, totalBase, lastPrice fixedpoin
|
|||
Quantity: quantity,
|
||||
Market: s.Market,
|
||||
TimeInForce: types.TimeInForceGTC,
|
||||
Tag: "grid",
|
||||
Tag: orderTag,
|
||||
})
|
||||
quoteQuantity := quantity.Mul(price)
|
||||
usedQuote = usedQuote.Add(quoteQuantity)
|
||||
|
|
Loading…
Reference in New Issue
Block a user