mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
Merge pull request #1162 from c9s/fix/profit-fixer
FIX: [grid2] emit grid profit after profit stats fix
This commit is contained in:
commit
32543c3773
|
@ -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