diff --git a/pkg/indicator/inf.go b/pkg/indicator/inf.go index 7c0b676ba..e678e25bf 100644 --- a/pkg/indicator/inf.go +++ b/pkg/indicator/inf.go @@ -16,6 +16,12 @@ type KLinePusher interface { PushK(k types.KLine) } +// KLineLoader provides an interface for API user to load history klines to the indicator. +// The indicator implements its own way to calculate the values from the given history kline array. +type KLineLoader interface { + LoadK(allKLines []types.KLine) +} + type KLineCalculateUpdater interface { CalculateAndUpdate(allKLines []types.KLine) }