ArrayExt

Array extensions
get(a, idx) Get element from the array at index, or na if index not found
Parameters:
a: The array
idx: The array index to get
Returns: The array item if exists or na
get(a, idx) Get element from the array at index, or na if index not found
Parameters:
a: The array
idx: The array index to get
Returns: The array item if exists or na
get(a, idx) Get element from the array at index, or na if index not found
Parameters:
a: The array
idx: The array index to get
Returns: The array item if exists or na
get(a, idx) Get element from the array at index, or na if index not found
Parameters:
a: The array
idx: The array index to get
Returns: The array item if exists or na
get(a, idx) Get element from the array at index, or na if index not found
Parameters:
a: The array
idx: The array index to get
Returns: The array item if exists or na
get(a, idx) Get element from the array at index, or na if index not found
Parameters:
a: The array
idx: The array index to get
Returns: The array item if exists or na
set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
Parameters:
a: The array
idx: The array index to set
val: The value to be set
set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
Parameters:
a: The array
idx: The array index to set
val: The value to be set
set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
Parameters:
a: The array
idx: The array index to set
val: The value to be set
set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
Parameters:
a: The array
idx: The array index to set
val: The value to be set
set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
Parameters:
a: The array
idx: The array index to set
val: The value to be set
set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
Parameters:
a: The array
idx: The array index to set
val: The value to be set
Added:
multisort(base_array, second) Sort arrays together
Parameters:
base_array: The base array to sort
second: array The second array elements swaped the same way as base array
Returns: Array of old indexes
reorder(index_array, array) Reorder array based on indexes
Parameters:
index_array: The array of indexes of the new order
array: The array to be reorder
Updated:
Reverse order support, small bugfixes
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open-source, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento.
Declinazione di responsabilità
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open-source, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento.