diff --git a/pkg/bbgo/session.go b/pkg/bbgo/session.go index 7457f9a0c..e305adef5 100644 --- a/pkg/bbgo/session.go +++ b/pkg/bbgo/session.go @@ -422,7 +422,6 @@ func (session *ExchangeSession) initSymbol(ctx context.Context, environ *Environ // always subscribe the 1m kline so we can make sure the connection persists. klineSubscriptions[minInterval] = struct{}{} - log.Warnf("sub: %v", klineSubscriptions) for interval := range klineSubscriptions { // avoid querying the last unclosed kline @@ -451,8 +450,6 @@ func (session *ExchangeSession) initSymbol(ctx context.Context, environ *Environ session.lastPrices[symbol] = lastKLine.Close } - log.Warnf("load %s", interval) - for _, k := range kLines { // let market data store trigger the update, so that the indicator could be updated too. marketDataStore.AddKLine(k) diff --git a/pkg/types/interval.go b/pkg/types/interval.go index 300ca0865..10c0243af 100644 --- a/pkg/types/interval.go +++ b/pkg/types/interval.go @@ -25,7 +25,8 @@ func (i Interval) Seconds() int { return m } -// specially handled, for better precision +// Milliseconds is specially handled, for better precision +// for ms level interval, calling Seconds and Minutes directly might trigger panic error func (i Interval) Milliseconds() int { t := 0 index := 0