I want to shift "close" series into the past by X elements and then populate those X elements with data to simulate how %B, RSI, ema/sma, etc is affected in the future.
hist[5] = close
hist[4] = 5
hist[3] = 5.5
hist[2] = 5
hist[1] = 4.5
hist[0] = 6
I want to compute ema/sma/rsi etc on series "hist". How can I do this with PineScript?