array.push() - Pine Script Function
array.push()
Section titled “array.push()”Overview
Section titled “Overview”The function appends a value to an array.
Syntax
Section titled “Syntax”array.push(id, value) → voidParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| id | any array type | An array object. |
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("array.push example")a = array.new_float(5, 0)array.push(a, open)plot(array.get(a, 5))