mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +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)
|
profitStats.AddProfit(*profit)
|
||||||
|
|
||||||
Notify(profit)
|
if !e.disableNotify {
|
||||||
Notify(profitStats)
|
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) {
|
orderExecutor.TradeCollector().OnPositionUpdate(func(position *types.Position) {
|
||||||
bbgo.Sync(ctx, s)
|
bbgo.Sync(ctx, s)
|
||||||
})
|
})
|
||||||
|
orderExecutor.BindProfitStats(s.ProfitStats)
|
||||||
return orderExecutor
|
return orderExecutor
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user