Skip to content
Algo Trade Analytics Docs

map.get() - Pine Script Function

Returns the value associated with the specified key in the id map.

map.get(id, key) → <value_type>
NameTypeDescription
idany map typeA map object.
//@version=6
indicator("map.get example")
a = map.new<int, int>()size = 10
for i = 0 to size
a.put(i, size-i)
plot(map.get(a, 1))