fix types.TradeStats usage

This commit is contained in:
c9s 2022-07-08 15:44:32 +08:00
parent 581e4be218
commit 46d6ecc663
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -283,9 +283,8 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
s.ProfitStats = types.NewProfitStats(s.Market)
}
// Trade stats
if s.TradeStats == nil {
s.TradeStats = &types.TradeStats{}
s.TradeStats = types.NewTradeStats(s.Symbol)
}
// Set fee rate