Merge pull request #1797 from c9s/c9s/liqmaker/metrics-and-tests
Some checks are pending
Go / build (1.21, 6.2) (push) Waiting to run
golang-lint / lint (push) Waiting to run

FIX: [liqmaker] fix stopEMA subscription
This commit is contained in:
c9s 2024-10-28 18:18:43 +08:00 committed by GitHub
commit 39d3dc0aac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,6 +118,10 @@ func (s *Strategy) InstanceID() string {
func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) { 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.AdjustmentUpdateInterval})
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.LiquidityUpdateInterval}) 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 { func (s *Strategy) Defaults() error {