liqmaker: fix stopEMA subscription

This commit is contained in:
c9s 2024-10-28 18:08:34 +08:00
parent 4d4afee6aa
commit c3fec1cccd
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -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 {