bbgo_origin/pkg/indicator/macd_callbacks.go

16 lines
305 B
Go
Raw Normal View History

2021-05-08 16:56:44 +00:00
// Code generated by "callbackgen -type MACD"; DO NOT EDIT.
package indicator
import ()
func (inc *MACD) OnUpdate(cb func(value float64)) {
inc.UpdateCallbacks = append(inc.UpdateCallbacks, cb)
}
func (inc *MACD) EmitUpdate(value float64) {
for _, cb := range inc.UpdateCallbacks {
cb(value)
}
}