diff --git a/pkg/indicator/rsi.go b/pkg/indicator/rsi.go index 30d8662a5..286b7b16e 100644 --- a/pkg/indicator/rsi.go +++ b/pkg/indicator/rsi.go @@ -22,7 +22,7 @@ type RSI struct { PreviousAvgGain float64 EndTime time.Time - UpdateCallbacks []func(value float64) + updateCallbacks []func(value float64) } func (inc *RSI) Update(price float64) { diff --git a/pkg/indicator/rsi_callbacks.go b/pkg/indicator/rsi_callbacks.go index 2c1a11f66..ea795930e 100644 --- a/pkg/indicator/rsi_callbacks.go +++ b/pkg/indicator/rsi_callbacks.go @@ -5,11 +5,11 @@ package indicator import () func (inc *RSI) OnUpdate(cb func(value float64)) { - inc.UpdateCallbacks = append(inc.UpdateCallbacks, cb) + inc.updateCallbacks = append(inc.updateCallbacks, cb) } func (inc *RSI) EmitUpdate(value float64) { - for _, cb := range inc.UpdateCallbacks { + for _, cb := range inc.updateCallbacks { cb(value) } }