From c3fec1cccdeed43993463aea2b3e06b8e8ee5486 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 28 Oct 2024 18:08:34 +0800 Subject: [PATCH] liqmaker: fix stopEMA subscription --- pkg/strategy/liquiditymaker/strategy.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/strategy/liquiditymaker/strategy.go b/pkg/strategy/liquiditymaker/strategy.go index d184a7f68..a5101e1ca 100644 --- a/pkg/strategy/liquiditymaker/strategy.go +++ b/pkg/strategy/liquiditymaker/strategy.go @@ -118,6 +118,10 @@ func (s *Strategy) InstanceID() string { func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) { session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.AdjustmentUpdateInterval}) session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.LiquidityUpdateInterval}) + + if s.StopEMA != nil && s.StopEMA.Interval != "" { + session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.StopEMA.Interval}) + } } func (s *Strategy) Defaults() error {