From 20938895a80153722e8b28e11e3ab4047aea6a4b Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 30 Jan 2022 01:40:33 +0800 Subject: [PATCH] bollmaker: merge skip condition --- pkg/strategy/bollmaker/strategy.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/strategy/bollmaker/strategy.go b/pkg/strategy/bollmaker/strategy.go index 446dae14c..96b46550c 100644 --- a/pkg/strategy/bollmaker/strategy.go +++ b/pkg/strategy/bollmaker/strategy.go @@ -754,10 +754,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se }) session.MarketDataStream.OnKLineClosed(func(kline types.KLine) { - if kline.Symbol != s.Symbol { - return - } - if kline.Interval != s.Interval { + if kline.Symbol != s.Symbol || kline.Interval != s.Interval { return } @@ -765,6 +762,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se log.WithError(err).Errorf("graceful cancel order error") } + // check if there is a canceled order had partially filled. s.tradeCollector.Process() if s.UseTickerPrice {