diff --git a/pkg/strategy/xmaker/strategy.go b/pkg/strategy/xmaker/strategy.go index 5826207fe..154f227e7 100644 --- a/pkg/strategy/xmaker/strategy.go +++ b/pkg/strategy/xmaker/strategy.go @@ -1398,7 +1398,6 @@ func (s *Strategy) CrossRun( // initialize the price resolver sourceMarkets := s.sourceSession.Markets() - s.priceSolver = pricesolver.NewSimplePriceResolver(sourceMarkets) makerSession, ok := sessions[s.MakerExchange] if !ok { @@ -1475,6 +1474,9 @@ func (s *Strategy) CrossRun( }) } + s.priceSolver = pricesolver.NewSimplePriceResolver(sourceMarkets) + s.priceSolver.BindStream(s.sourceSession.MarketDataStream) + s.sourceSession.MarketDataStream.OnKLineClosed(types.KLineWith(s.Symbol, types.Interval1m, func(k types.KLine) { s.priceSolver.Update(k.Symbol, k.Close) feeToken := s.sourceSession.Exchange.PlatformFeeCurrency()