pinecoders / pinecoders.github.io

PineCoders Web Site
http://www.pinecoders.com
GNU General Public License v3.0
86 stars 68 forks source link

Pinescript dictionnary integration #65

Closed RomainPhil closed 3 years ago

RomainPhil commented 3 years ago

Hi,

I'v discover the pine script recently and the maintainability of some of my script start to become really complicated du to the absence of the object working like a dictionnary python example and the fact the array tipe can't store a string https://www.tradingview.com/pine-script-docs/en/v4/language/Type_system.html#array

the size of a script attain more than 200 line with many If impricate and for each etf add to this the size grow up exponentially which wouldn't be the case with the two programatic upgrade: dictionnary and the possibility for array to store string and the a dictionnary object

popopame commented 3 years ago

Writing understandable and maintainable Script is borderline impossible without dictionary and proper loop.

This would be a excellent addition to pine script.

LucFF commented 3 years ago

Thx for your suggestion. Arrays of strings are now supported: https://www.tradingview.com/pine-script-docs/en/v4/Release_notes.html#december-2020 but not dictionaries yet. We will consider adding dictionaries or something similar.

megasyl commented 2 years ago

Hi, I support this suggestion. I'm happy to read a 'yet', any news about it ? :D

LucFF commented 2 years ago

Specs for maps are done but they are not in the pipeline yet. 2022 should see 2d arrays first, and then maps, perhaps. No promises.