diff --git a/pkg/strategy/pivotshort/resistance.go b/pkg/strategy/pivotshort/resistance.go index 6ab7267e7..8ee4c2c5d 100644 --- a/pkg/strategy/pivotshort/resistance.go +++ b/pkg/strategy/pivotshort/resistance.go @@ -39,6 +39,8 @@ type ResistanceShort struct { } func (s *ResistanceShort) Subscribe(session *bbgo.ExchangeSession) { + session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.Interval}) + if s.TrendEMA != nil { session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.TrendEMA.Interval}) } diff --git a/pkg/strategy/pivotshort/strategy.go b/pkg/strategy/pivotshort/strategy.go index d1f28ee47..783464b36 100644 --- a/pkg/strategy/pivotshort/strategy.go +++ b/pkg/strategy/pivotshort/strategy.go @@ -188,7 +188,7 @@ func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) { if s.ResistanceShort != nil && s.ResistanceShort.Enabled { dynamic.InheritStructValues(s.ResistanceShort, s) - session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.ResistanceShort.Interval}) + s.ResistanceShort.Subscribe(session) } if s.BreakLow != nil {