mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +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 ID = "grid2"
|
||||||
|
|
||||||
|
const orderTag = "grid2"
|
||||||
|
|
||||||
var log = logrus.WithField("strategy", ID)
|
var log = logrus.WithField("strategy", ID)
|
||||||
|
|
||||||
var maxNumberOfOrderTradesQueryTries = 10
|
var maxNumberOfOrderTradesQueryTries = 10
|
||||||
|
@ -366,7 +368,7 @@ func (s *Strategy) processFilledOrder(o types.Order) {
|
||||||
Side: newSide,
|
Side: newSide,
|
||||||
TimeInForce: types.TimeInForceGTC,
|
TimeInForce: types.TimeInForceGTC,
|
||||||
Quantity: newQuantity,
|
Quantity: newQuantity,
|
||||||
Tag: "grid",
|
Tag: orderTag,
|
||||||
}
|
}
|
||||||
|
|
||||||
s.logger.Infof("SUBMIT GRID REVERSE ORDER: %s", orderForm.String())
|
s.logger.Infof("SUBMIT GRID REVERSE ORDER: %s", orderForm.String())
|
||||||
|
@ -899,7 +901,7 @@ func (s *Strategy) generateGridOrders(totalQuote, totalBase, lastPrice fixedpoin
|
||||||
Quantity: quantity,
|
Quantity: quantity,
|
||||||
Market: s.Market,
|
Market: s.Market,
|
||||||
TimeInForce: types.TimeInForceGTC,
|
TimeInForce: types.TimeInForceGTC,
|
||||||
Tag: "grid",
|
Tag: orderTag,
|
||||||
})
|
})
|
||||||
quoteQuantity := quantity.Mul(price)
|
quoteQuantity := quantity.Mul(price)
|
||||||
usedQuote = usedQuote.Add(quoteQuantity)
|
usedQuote = usedQuote.Add(quoteQuantity)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user