mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +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) {
|
||||
for _, k := range kLines {
|
||||
s.kLines = append(s.kLines, k)
|
||||
}
|
||||
s.kLines = append(s.kLines, kLines...)
|
||||
}
|
||||
|
||||
// KLines creates a KLine stream that pushes the klines to the subscribers
|
||||
|
|
Loading…
Reference in New Issue
Block a user