bollmaker: fix ema cross subscription

This commit is contained in:
c9s 2023-12-20 12:09:19 +08:00
parent 127d4484fb
commit 311ba3b2ac
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -213,6 +213,10 @@ func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) {
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.TrendEMA.Interval})
}
if s.EMACrossSetting != nil && s.EMACrossSetting.Enabled {
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.EMACrossSetting.Interval})
}
s.ExitMethods.SetAndSubscribe(session, s)
}