bbgo_origin/pkg/indicator/kd_callbacks.go
2021-05-22 03:24:09 +08:00

16 lines
286 B
Go

// 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)
}
}