I'm writing a pine code and need to evaluate the highest and lowest value of an indictor (like rsi) displayed on the window (shown time range), and if I change the time range it can be updated automatically (like high, avg, low label of price bar that trading view has), anyone knows how can I evaluate the highest value of the displayed range of an indicator?
or how can we get the bar_index of the first and last bar displayed on the tradingview chart?
Thanks