diff --git a/pkg/strategy/pivotshort/failedbreakhigh.go b/pkg/strategy/pivotshort/failedbreakhigh.go index eb30dc91b..30ad0a32e 100644 --- a/pkg/strategy/pivotshort/failedbreakhigh.go +++ b/pkg/strategy/pivotshort/failedbreakhigh.go @@ -341,7 +341,7 @@ func (s *FailedBreakHigh) detectMacdDivergence() { var histogramPivots floats.Slice for i := pivotWindow; i > 0 && i < len(histogramValues); i++ { // find positive histogram and the top - pivot, ok := floats.CalculatePivot(histogramValues[0:i], pivotWindow, pivotWindow, func(a, pivot float64) bool { + pivot, ok := floats.FindPivot(histogramValues[0:i], pivotWindow, pivotWindow, func(a, pivot float64) bool { return pivot > 0 && pivot > a }) if ok {