map.size() - Pine Script Function
map.size()
Section titled “map.size()”Overview
Section titled “Overview”Returns the number of key-value pairs in the id map.
Syntax
Section titled “Syntax”map.size(id) → series intParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| id | any map type | A map object. |
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("map.size example")a = map.new<int, int>()size = 10for i = 0 to sizea.put(i, size-i)plot(map.size(a))