mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
xdepthmaker: another fix
This commit is contained in:
parent
f5873172de
commit
be89292cbb
|
@ -324,14 +324,14 @@ func (s *Strategy) CrossRun(
|
|||
return errors.New("tradesSince time can not be zero")
|
||||
}
|
||||
|
||||
fixer := NewProfitFixer(s.makerMarket)
|
||||
fixer.AddExchange(makerSession.Name, makerSession.Exchange.(types.ExchangeTradeHistoryService))
|
||||
fixer.AddExchange(hedgeSession.Name, hedgeSession.Exchange.(types.ExchangeTradeHistoryService))
|
||||
|
||||
makerMarket, _ := s.makerSession.Market(s.Symbol)
|
||||
makerMarket, _ := makerSession.Market(s.Symbol)
|
||||
s.CrossExchangeMarketMakingStrategy.Position = types.NewPositionFromMarket(makerMarket)
|
||||
s.CrossExchangeMarketMakingStrategy.ProfitStats = types.NewProfitStats(makerMarket)
|
||||
|
||||
fixer := NewProfitFixer(makerMarket)
|
||||
fixer.AddExchange(makerSession.Name, makerSession.Exchange.(types.ExchangeTradeHistoryService))
|
||||
fixer.AddExchange(hedgeSession.Name, hedgeSession.Exchange.(types.ExchangeTradeHistoryService))
|
||||
|
||||
if err2 := fixer.Fix(ctx, s.ProfitFixerConfig.TradesSince.Time(), time.Now(), s.CrossExchangeMarketMakingStrategy.ProfitStats, s.CrossExchangeMarketMakingStrategy.Position); err2 != nil {
|
||||
return err2
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user