mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
pivotshort: fix resistance short subscribe
This commit is contained in:
parent
a48471d4c8
commit
c8c7211e75
|
@ -39,6 +39,8 @@ type ResistanceShort struct {
|
|||
}
|
||||
|
||||
func (s *ResistanceShort) Subscribe(session *bbgo.ExchangeSession) {
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.Interval})
|
||||
|
||||
if s.TrendEMA != nil {
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.TrendEMA.Interval})
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) {
|
|||
|
||||
if s.ResistanceShort != nil && s.ResistanceShort.Enabled {
|
||||
dynamic.InheritStructValues(s.ResistanceShort, s)
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.ResistanceShort.Interval})
|
||||
s.ResistanceShort.Subscribe(session)
|
||||
}
|
||||
|
||||
if s.BreakLow != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user