Not sure I fully understand the question but here goes…
The currently forming candle (the last one on the chart) is always [0]. The candle before it is [1] and the one before that is [2] and so on.
So if you want to know any of the values or indicator values of the currently forming candle then you want to look at high[0], low[0], average[12](close[0]) etc. You can omit the [0] in your code as if there is no value then PRT code just assumes that it is zero.
EDIT: I think we were typing at the same time Roberto!
1 user thanked author for this post.