Skip to content
Algo Trade Analytics Docs

array.includes() - Pine Script Function

The function returns true if the value was found in an array, false otherwise.

array.includes(id, value) → series bool
NameTypeDescription
idany array typeAn array object.

True if the value was found in the array, false otherwise.

//@version=6
indicator("array.includes example")
a = array.new_float(5,high)p = close
if array.includes(a, high) p := open
plot(p)