mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
bbgo: check e.disableNotify for profit stats
This commit is contained in:
parent
e41df7e321
commit
78c73e4514
|
@ -155,8 +155,10 @@ func (e *GeneralOrderExecutor) BindProfitStats(profitStats *types.ProfitStats) {
|
|||
|
||||
profitStats.AddProfit(*profit)
|
||||
|
||||
Notify(profit)
|
||||
Notify(profitStats)
|
||||
if !e.disableNotify {
|
||||
Notify(profit)
|
||||
Notify(profitStats)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
1
pkg/strategy/xfunding/profitstats.go
Normal file
1
pkg/strategy/xfunding/profitstats.go
Normal file
|
@ -0,0 +1 @@
|
|||
package xfunding
|
|
@ -843,5 +843,6 @@ func (s *Strategy) allocateOrderExecutor(ctx context.Context, session *bbgo.Exch
|
|||
orderExecutor.TradeCollector().OnPositionUpdate(func(position *types.Position) {
|
||||
bbgo.Sync(ctx, s)
|
||||
})
|
||||
orderExecutor.BindProfitStats(s.ProfitStats)
|
||||
return orderExecutor
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user