mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-13 02:23:51 +00:00
bbgo: add warning
This commit is contained in:
parent
f91a4c2979
commit
b29c1aa972
|
@ -1,6 +1,8 @@
|
||||||
package bbgo
|
package bbgo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/c9s/bbgo/pkg/indicator"
|
"github.com/c9s/bbgo/pkg/indicator"
|
||||||
"github.com/c9s/bbgo/pkg/types"
|
"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)
|
kLines := indicator.KLines(i.stream, i.Symbol, interval)
|
||||||
if kLinesWindow, ok := i.store.KLinesOfInterval(interval); ok {
|
if kLinesWindow, ok := i.store.KLinesOfInterval(interval); ok {
|
||||||
kLines.AddBackLog(*kLinesWindow)
|
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
|
i.kLines[interval] = kLines
|
||||||
|
|
Loading…
Reference in New Issue
Block a user