mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
grid2: emit grid profit after profit stats fix
This commit is contained in:
parent
46a6d896a2
commit
32b2c43198
|
@ -89,6 +89,8 @@ func (s *Strategy) recoverByScanningTrades(ctx context.Context, session *bbgo.Ex
|
|||
}
|
||||
|
||||
s.logger.Infof("fixed profitStats: %#v", s.GridProfitStats)
|
||||
|
||||
s.EmitGridProfit(s.GridProfitStats, nil)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -1852,7 +1852,9 @@ func (s *Strategy) Run(ctx context.Context, _ bbgo.OrderExecutor, session *bbgo.
|
|||
s.orderExecutor = orderExecutor
|
||||
|
||||
s.OnGridProfit(func(stats *GridProfitStats, profit *GridProfit) {
|
||||
bbgo.Notify(profit)
|
||||
if profit != nil {
|
||||
bbgo.Notify(profit)
|
||||
}
|
||||
bbgo.Notify(stats)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user