![[-_-] Dictionary chart preview](https://s3.tradingview.com/p/P67EBBPr.png?v=1677863891)
A custom dictionary-like data structure in Pine Script that allows storing and retrieving key-value pairs of different types with flexible methods for data management.
Explore complementary indicator rolesHow it works
The dictionary implementation uses two internal string arrays to store keys and values, enabling flexible data storage across multiple types like strings, integers, floats, booleans, and colors. When adding an item, the key and value are converted to string representations, allowing mixed-type storage in a single dictionary structure.
The dictionary provides specialized methods for initializing, setting, retrieving, and removing items. Each retrieval method (getS, getI, getF, getB, getC) corresponds to a specific data type, ensuring type-specific access and conversion back from string representations.
Why it may be useful
This custom dictionary implementation provides traders and developers with a robust, flexible data management solution that overcomes limitations in standard Pine Script data structures. By supporting multiple data types and offering type-specific retrieval methods, it enhances code readability and simplifies complex data handling scenarios in trading script development.
The implementation allows developers to create more dynamic and versatile trading indicators by easily storing and manipulating different types of data within a single, coherent structure. This approach streamlines data management and enables more sophisticated algorithmic trading strategies.
When to explore it
This dictionary implementation is particularly useful when developing complex trading scripts that require storing and managing multiple types of data with different characteristics. It's ideal for scenarios where you need to track various trading parameters, store configuration settings, or maintain state information across different indicator calculations.
Traders and developers can leverage this approach when building custom indicators, strategy modules, or configuration management systems that demand flexible, type-aware data storage and retrieval mechanisms.
Keep exploring
What we’ve verified
Access, alerts and repainting behaviour have not been independently verified for this indicator. Check the creator’s current publication and settings.
General descriptions and classifications are recovered research. Verified details above identify the specific checks we have completed. Check the creator’s current publication for later changes.



![[CLX] Library Motion - Examples chart preview](https://s3.tradingview.com/k/KiuwdJVY.png?v=1676804330)


![Support Resistance Major/Minor [TradingFinder] Market Structure chart preview](https://s3.tradingview.com/m/Me7KuDEE.png?v=1735821421)