mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
schedule: fix schedule subscription
This commit is contained in:
parent
cf29cfadd0
commit
66b7e1fc3f
|
@ -96,6 +96,12 @@ func (s *Strategy) ID() string {
|
|||
|
||||
func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) {
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.Interval.String()})
|
||||
if s.BelowMovingAverage != nil {
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.BelowMovingAverage.Interval.String()})
|
||||
}
|
||||
if s.AboveMovingAverage != nil {
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.AboveMovingAverage.Interval.String()})
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Strategy) Validate() error {
|
||||
|
|
Loading…
Reference in New Issue
Block a user