Relative Content

Tag Archive for arraysinputpine-script-v5

Dynamic array length in PineScript 5

I need to input a variable number of inputs into a PineScript to draw some price levels. The number of levels may vary day by day, sometimes I need 5, sometimes 7+. I want to declare an array in PineScript that will accept at least 1 array parameter and then have a blank space to enter a 2nd, 3rd, etc. depending on how many are needed for that day. The input should ignore the last (blank) parameter, signifying the end of the array. Is something like this possible?