mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
parent
061312771c
commit
4b66deec3d
|
@ -91,6 +91,10 @@ func (s *Strategy) ID() string {
|
||||||
func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) {
|
func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) {
|
||||||
// currently we need the 1m kline to update the last close price and indicators
|
// currently we need the 1m kline to update the last close price and indicators
|
||||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.Interval.String()})
|
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.Interval.String()})
|
||||||
|
|
||||||
|
if s.Interval != s.RepostInterval {
|
||||||
|
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: s.RepostInterval.String()})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Strategy) generateGridBuyOrders(session *bbgo.ExchangeSession) ([]types.SubmitOrder, error) {
|
func (s *Strategy) generateGridBuyOrders(session *bbgo.ExchangeSession) ([]types.SubmitOrder, error) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user