mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
xmaker: reuse makerMarket field
This commit is contained in:
parent
a4833524cf
commit
4d1c357c3d
|
@ -1300,9 +1300,8 @@ func (s *Strategy) CrossRun(
|
||||||
return errors.New("tradesSince time can not be zero")
|
return errors.New("tradesSince time can not be zero")
|
||||||
}
|
}
|
||||||
|
|
||||||
makerMarket, _ := makerSession.Market(s.Symbol)
|
position := types.NewPositionFromMarket(s.makerMarket)
|
||||||
position := types.NewPositionFromMarket(makerMarket)
|
profitStats := types.NewProfitStats(s.makerMarket)
|
||||||
profitStats := types.NewProfitStats(makerMarket)
|
|
||||||
|
|
||||||
fixer := common.NewProfitFixer()
|
fixer := common.NewProfitFixer()
|
||||||
// fixer.ConverterManager = s.ConverterManager
|
// fixer.ConverterManager = s.ConverterManager
|
||||||
|
@ -1317,7 +1316,7 @@ func (s *Strategy) CrossRun(
|
||||||
fixer.AddExchange(sourceSession.Name, ss)
|
fixer.AddExchange(sourceSession.Name, ss)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err2 := fixer.Fix(ctx, makerMarket.Symbol,
|
if err2 := fixer.Fix(ctx, s.makerMarket.Symbol,
|
||||||
s.ProfitFixerConfig.TradesSince.Time(),
|
s.ProfitFixerConfig.TradesSince.Time(),
|
||||||
time.Now(),
|
time.Now(),
|
||||||
profitStats,
|
profitStats,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user