marspumpkin

hashmaps

marspumpkin Zaktualizowano   
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.
Informacje o Wersji:
v2 - supports PSONs as value
Informacje o Wersji:
v3 added contains()
Informacje o Wersji:
v4 added new put() functions and get_float() get_int() get_bool()
Informacje o Wersji:
v5 added remove()
Biblioteka Pine

Działając zgodnie z prawdziwym duchem TradingView, autor opublikował ten kod Pine jako bibliotekę o otwartym kodzie źródłowym, aby inni programiści Pine z naszej społeczności mogli go ponownie wykorzystać. Brawa dla niego! Możesz korzystać z tej biblioteki prywatnie lub w innych publikacjach typu open source, ale ponowne wykorzystanie tego kodu w publikacji podlega Regulaminowi.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz skorzystać z tej biblioteki?

Skopiuj poniższy wiersz i wklej go w swoim skrypcie.