bollmaker: call RecordProfit

This commit is contained in:
c9s 2022-03-06 15:39:20 +08:00
parent 8fa0e6702c
commit 25f3aeef58
2 changed files with 2 additions and 1 deletions

View File

@ -568,6 +568,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
p := s.state.Position.NewProfit(trade, profit, netProfit) p := s.state.Position.NewProfit(trade, profit, netProfit)
p.Strategy = ID p.Strategy = ID
p.StrategyInstanceID = instanceID p.StrategyInstanceID = instanceID
s.Environment.RecordProfit(p)
s.state.ProfitStats.AddProfit(p) s.state.ProfitStats.AddProfit(p)
s.Notify(&p) s.Notify(&p)