array.range() - Pine Script Function
array.range()
Section titled “array.range()”Overview
Section titled “Overview”The function returns the difference between the min and max values from a given array.
Syntax
Section titled “Syntax”array.range(id) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| id | array<int/float> | An array object. |
Returns
Section titled “Returns”The difference between the min and max values 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.range example")a = array.new_float(0)for i = 0 to 9array.push(a, close[i])plot(array.range(a))