bbgo_origin/pkg/indicator/v2/stochstream_callbacks.go

16 lines
331 B
Go
Raw Normal View History

2023-06-01 06:52:09 +00:00
// Code generated by "callbackgen -type StochStream"; DO NOT EDIT.
2023-07-10 08:54:22 +00:00
package indicatorv2
2023-06-01 06:52:09 +00:00
import ()
func (S *StochStream) OnUpdate(cb func(k float64, d float64)) {
S.updateCallbacks = append(S.updateCallbacks, cb)
}
func (S *StochStream) EmitUpdate(k float64, d float64) {
for _, cb := range S.updateCallbacks {
cb(k, d)
}
}