Functions
array.lastindexof()
Returns the index of the last element equal to `value`, or -1 when no element matches.
Syntax
array.lastindexof(series array id, series <type of the array's elements> value) → series int
Arguments
id required series array value required series Return Type
series int Example
//@lipi=2
indicator("array.lastindexof Example", overlay=false)
values = array.from(1.0, 2.0, 1.0)
plot(array.lastindexof(values, 1.0), title="Last Index of 1 (2)", color=color.blue)