mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
set the defauinteralv alue to 1m
This commit is contained in:
parent
151722664f
commit
2567bd0caa
|
@ -41,6 +41,9 @@ type ProtectiveStopLoss struct {
|
|||
}
|
||||
|
||||
func (s *ProtectiveStopLoss) Subscribe(session *ExchangeSession) {
|
||||
if s.Interval == "" {
|
||||
s.Interval = types.Interval1m
|
||||
}
|
||||
// use kline to handle roi stop
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.Interval})
|
||||
}
|
||||
|
|
|
@ -21,6 +21,9 @@ type RoiStopLoss struct {
|
|||
|
||||
func (s *RoiStopLoss) Subscribe(session *ExchangeSession) {
|
||||
// use kline to handle roi stop
|
||||
if s.Interval == "" {
|
||||
s.Interval = types.Interval1m
|
||||
}
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.Interval})
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,9 @@ type RoiTakeProfit struct {
|
|||
|
||||
func (s *RoiTakeProfit) Subscribe(session *ExchangeSession) {
|
||||
// use kline to handle roi stop
|
||||
if s.Interval == "" {
|
||||
s.Interval = types.Interval1m
|
||||
}
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.Interval})
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ type TrailingStop2 struct {
|
|||
}
|
||||
|
||||
func (s *TrailingStop2) Subscribe(session *ExchangeSession) {
|
||||
if s.Interval == "" {
|
||||
s.Interval = types.Interval1m
|
||||
}
|
||||
// use 1m kline to handle roi stop
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.Interval})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user