bbgo_origin/pkg/indicator/kd_callbacks.go

16 lines
286 B
Go
Raw Normal View History

2021-05-21 19:24:09 +00:00
// Code generated by "callbackgen -type KD"; DO NOT EDIT.
package indicator
import ()
func (K *KD) OnUpdate(cb func(k, d float64)) {
K.UpdateCallbacks = append(K.UpdateCallbacks, cb)
}
func (K *KD) EmitUpdate(k, d float64) {
for _, cb := range K.UpdateCallbacks {
cb(k, d)
}
}