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 with a color, a float, an assigned int and those 4 props each have 3 sub-assigned values. as in demo, the alternating table object has 2 different tables it's a pseudo more complex wa to create our own flexible version of a UDT, but that will not ~break~ on library updates so you can update awa without fear, as this libb will no change saving ou the hassle of creating UDT's that continually change.
set(dict, _object, _prop, _item) Add/Updates item to storage. Autoselects subclass dictionary on set Parameters: dict: (dictionary) dict.type subdictionary (req for overload) _object: (string) object name _prop _item: (<any>) item to set Returns: item item wwith column/row
get(typedict, _object, _prop) Get item by object name and property (string) Parameters: typedict: (<any>dict) dict.type subdictionary (req for overload) _object: (string) object name _prop Returns: <type> item from storage
remove(typedict, _object, _prop) Remove a specific property from an object Parameters: typedict: (<any>dict) dict.type subdictionary (req for overload) _object: (string) object name _prop Returns: <type> item from storage
delete(_dict, _object) Remove a complete Object and all props Parameters: _dict _object: (string) object name Returns: <type> item from storage
delete(_dict, _index) Parameters: _dict _index
wipe(_dict, _object, _prop) Remove Property slot for all 10 item types Parameters: _dict: (dictionary) The full dictionary item _object: (string) object name _prop Returns: <type> item from storage
wipe(_dict, _index) Parameters: _dict _index
init(_Objlim, _Proplim) Create New Dictionary ready to use (9999 size limit - (_objlim +_Proplim) for row/column 0) # Full dictionary with all types > start with this Parameters: _Objlim: (int) maximum objects (think horizontal) _Proplim: (int) maximum properties per obj (vertical) Returns: dictionary typoe object
De acordo com o verdadeiro espírito do TradingView, o autor publicou esse código Pine como uma biblioteca de código aberto para que outros programadores Pine de nossa comunidade possam reutilizá-lo. Parabéns ao autor! Você pode usar essa biblioteca de forma privada ou em outras publicações de código aberto, mas a reutilização desse código em uma publicação é regida pelas Regras da Casa.
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.