mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
indicator: add KLineLoader interface
This commit is contained in:
parent
cb481c660f
commit
77264342ce
|
@ -16,6 +16,12 @@ type KLinePusher interface {
|
||||||
PushK(k types.KLine)
|
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 {
|
type KLineCalculateUpdater interface {
|
||||||
CalculateAndUpdate(allKLines []types.KLine)
|
CalculateAndUpdate(allKLines []types.KLine)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user