array.min() - Pine Script Function
array.min()
Section titled “array.min()”Overview
Section titled “Overview”The function returns the smallest value, or the nth smallest value in a given array.
Syntax
Section titled “Syntax”array.min(id, nth) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| id | array<int/float> | An array object. |
Returns
Section titled “Returns”The smallest or the nth smallest value in the array.
Remarks
Section titled “Remarks”- Returns na if the id array is empty.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("array.min")a = array.from(5, -2, 0, 9, 1)secondLowest = array.min(a, 1) // 0plot(secondLowest)