diff --git a/pkg/bbgo/standard_indicator_set.go b/pkg/bbgo/standard_indicator_set.go index 893ea7247..5df32a7b5 100644 --- a/pkg/bbgo/standard_indicator_set.go +++ b/pkg/bbgo/standard_indicator_set.go @@ -93,10 +93,15 @@ func (s *StandardIndicatorSet) ATRP(iw types.IntervalWindow) *indicator.ATRP { } func (s *StandardIndicatorSet) EMV(iw types.IntervalWindow) *indicator.EMV { - inc := s.allocateSimpleIndicator(&indicator.ATRP{IntervalWindow: iw}, iw) + inc := s.allocateSimpleIndicator(&indicator.EMV{IntervalWindow: iw}, iw) return inc.(*indicator.EMV) } +func (s *StandardIndicatorSet) CCI(iw types.IntervalWindow) *indicator.CCI { + inc := s.allocateSimpleIndicator(&indicator.CCI{IntervalWindow: iw}, iw) + return inc.(*indicator.CCI) +} + func (s *StandardIndicatorSet) STOCH(iw types.IntervalWindow) *indicator.STOCH { inc, ok := s.stoch[iw] if !ok { diff --git a/pkg/indicator/cci.go b/pkg/indicator/cci.go index d7165037a..6a75ff563 100644 --- a/pkg/indicator/cci.go +++ b/pkg/indicator/cci.go @@ -78,7 +78,6 @@ func (inc *CCI) Length() int { var _ types.SeriesExtend = &CCI{} - func (inc *CCI) PushK(k types.KLine) { inc.Update(k.High.Add(k.Low).Add(k.Close).Div(three).Float64()) }