bbgo: add warning

This commit is contained in:
c9s 2023-06-30 10:35:34 +08:00
parent f91a4c2979
commit b29c1aa972
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -1,6 +1,8 @@
package bbgo
import (
"github.com/sirupsen/logrus"
"github.com/c9s/bbgo/pkg/indicator"
"github.com/c9s/bbgo/pkg/types"
)
@ -37,6 +39,8 @@ func (i *IndicatorSet) KLines(interval types.Interval) *indicator.KLineStream {
kLines := indicator.KLines(i.stream, i.Symbol, interval)
if kLinesWindow, ok := i.store.KLinesOfInterval(interval); ok {
kLines.AddBackLog(*kLinesWindow)
} else {
logrus.Warnf("market data store %s kline history not found, unable to backfill the kline stream data", interval)
}
i.kLines[interval] = kLines