Library "store" Object/Property Storage System Semi-Simplified. . It's a helpful toolset while designing UDT's as it remains flexible, this helps in not having to remap an entire script while tinkering. Set an object up, and add as man properties as yyou wish. a property can be one of any pine built in types. so a single object can contain sa, ohlc each...
The script shows an example implementation of dictionary-like data type which can store key:value pairs (Python style). Both keys and values can have any of the following type: • string • integer • float • boolean • color You can add items of different types to the same dictionary (e.g. key = 12 and value = "value" stored in the same dictionary with key = "key"...
Library "StringStringHashmap" A simple implementation of a key string-to-string value dictionary in pine script create_ss_dict() Create an empty string-string dictionary Returns: the indices and elements of the dict add_key_value(key, value, i, e) Add new key-value pair in the dictionary Parameters: key : string value : string i :...
Library "MiteTricks" Matrix Global Registry. Get, Set, automatic growing, universal get/set, multi-matrix dictionaries, multi-dictionary matrixes.. add slice matrixes of any type, share one common global key registry pull up an item from a category, and item name ie a table of info. same cell needs a color, a size, a string, a value, etc.. all of which can be...
A very simple Hashmap in Pinescript version 4 It uses two arrays one to store indices and one to store values currently this only supports keys of type int and values of type floats. index array: (20, 30, 80, 90) value array: (9.1,8.1,6.5,3.5) You can access the value 9.1 by using the key 20. No fancy hash functions were used just a very simple practical mechanism.
Hash map's in Pinescript?? Absolutely This Library is the first step towards bringing a much needed data structure to the Pine Script community. "Object" allows Pine coders to finally create objects full or unique key:value pairs, which are converted to strings and stored in an array. Data can be stored and accessed using dedicated get and set methods. The...
This Library is aimed to mitigate the limitation of Pinescript having only one structured data type which is only arrays. It lacks data types like Dictionaries(in Python) or Object (in JS) that are standard for other languages. Tuples do exist, but it hardly solves any problem. Working only with Arrays could be overwhelming if your codebase is large. I looked for...