mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
indicator: simplify add klines
This commit is contained in:
parent
eafd777046
commit
f91a4c2979
|
@ -37,9 +37,7 @@ func (s *KLineStream) AddSubscriber(f func(k types.KLine)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *KLineStream) AddBackLog(kLines []types.KLine) {
|
func (s *KLineStream) AddBackLog(kLines []types.KLine) {
|
||||||
for _, k := range kLines {
|
s.kLines = append(s.kLines, kLines...)
|
||||||
s.kLines = append(s.kLines, k)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// KLines creates a KLine stream that pushes the klines to the subscribers
|
// KLines creates a KLine stream that pushes the klines to the subscribers
|
||||||
|
|
Loading…
Reference in New Issue
Block a user