PINE LIBRARY
Aggiornato

hashmaps

A simple hashmap implementation for pinescript.

It gets your string array and transforms it into a hashmap.
Before using it you need to initialize your array with the size you need for your specific case since the size is not dynamic.

To use it, first you need to import it the following way:
> import marspumpkin/hashmaps/1

Then, initialize your array with the size needed for your specific case:
> hashmap = array.new_string(10000)

After that you can call:
> hashmaps.put() and hashmaps.get()

Passing in the array(hashmap), key and value.

I hope this helps you in your pinescript journey.
Note di rilascio
v2 - supports PSONs as value
Note di rilascio
v3 added contains()
Note di rilascio
v4 added new put() functions and get_float() get_int() get_bool()
Note di rilascio
v5 added remove()

Declinazione di responsabilità