rsi = ta.rsi(close, 14)
getSeriesVal(seriesName, nBack) =>
switch seriesName
"open" => open[nBack]
"high" => high[nBack]
"low" => low[nBack]
"close" => close[nBack]
"rsi" => rsi[nBack]
=> na
When trying the rsi from n backcandles at various indices (but not every iteration), sometimes the result from getSeriesVal get's na while the reading without the getter method has a real value.
With other words: getSeriesVal("rsi", 100) == rsi[100] is not always a true statement.
I've introduced this getter method, so my series wouldn't be hardcoded, cause passing the series directly among several functions resulted in reading becoming na as well.
Is there some way get this method to return the correct value?