mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
xfunding: bind profit stats
This commit is contained in:
parent
78c73e4514
commit
f127a530b7
|
@ -837,9 +837,6 @@ func (s *Strategy) allocateOrderExecutor(ctx context.Context, session *bbgo.Exch
|
|||
orderExecutor.SetMaxRetries(0)
|
||||
orderExecutor.BindEnvironment(s.Environment)
|
||||
orderExecutor.Bind()
|
||||
orderExecutor.TradeCollector().OnTrade(func(trade types.Trade, _, _ fixedpoint.Value) {
|
||||
s.ProfitStats.AddTrade(trade)
|
||||
})
|
||||
orderExecutor.TradeCollector().OnPositionUpdate(func(position *types.Position) {
|
||||
bbgo.Sync(ctx, s)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user