diff --git a/pkg/indicator/pivot_low.go b/pkg/indicator/pivot_low.go index f6a701371..af27e2f44 100644 --- a/pkg/indicator/pivot_low.go +++ b/pkg/indicator/pivot_low.go @@ -72,7 +72,7 @@ func calculatePivotLow(lows types.Float64Slice, window int) (float64, error) { return 0., fmt.Errorf("insufficient elements for calculating with window = %d", window) } - min := lows[length-(window-1):].Min() + min := lows[length-1-(window-1):].Min() if min == lows.Index(int(window/2.)-1) { return min, nil }