Skip to content
Algo Trade Analytics Docs

array.min() - Pine Script Function

The function returns the smallest value, or the nth smallest value in a given array.

array.min(id, nth) → series float
NameTypeDescription
idarray<int/float>An array object.

The smallest or the nth smallest value in the array.

  • Returns na if the id array is empty.
//@version=6
indicator("array.min")
a = array.from(5, -2, 0, 9, 1)secondLowest = array.min(a, 1) // 0
plot(secondLowest)