Skip to content

Commit

Permalink
bollmaker: fix ema cross subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Dec 20, 2023
1 parent 127d448 commit 311ba3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/strategy/bollmaker/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 311ba3b

Please sign in to comment.