mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
grid2: reset metricsGridOrderPrices
This commit is contained in:
parent
857b5d0f30
commit
75919a0bf1
|
@ -881,6 +881,7 @@ func (s *Strategy) openGrid(ctx context.Context, session *bbgo.ExchangeSession)
|
|||
func (s *Strategy) updateOpenOrderPricesMetrics(orders []types.Order) {
|
||||
orders = sortOrdersByPriceAscending(orders)
|
||||
num := len(orders)
|
||||
metricsGridOrderPrices.Reset()
|
||||
for idx, order := range orders {
|
||||
labels := s.newPrometheusLabels()
|
||||
labels["ith"] = strconv.Itoa(num - idx)
|
||||
|
|
Loading…
Reference in New Issue
Block a user