Could someone explain to me why line 17 generates an error. The array is 11 elements. Let's skip the last item.
//@version=5
indicator("SplitArrayTest", overlay = true)
printTable2(txt) => var table t = table.new(position.bottom_right, 1, 1), table.cell(t, 0, 0, txt, bgcolor = color.rgb(75, 255, 59))
//////////////////
var int idx = 0
var string prices = ""
if idx < 10
prices += str.tostring(close) +";"
idx +=1
arrayPrices = str.split(prices, ";")
sizeT = array.size(arrayPrices)
text12= array.get(arrayPrices,0) // <--------- OK
//text12= array.get(arrayPrices,1)// <-------- OK
//text12= array.get(arrayPrices,2) // <------- ERROR 2 "Index 2 is out of bands.."
printTable2(prices + "\n"+str.tostring(arrayPrices) + "\n" + str.tostring(sizeT) +"\n "+str.tostring(text12))