The code is purely based on the Relative Strength Indicator and the reason to amend is updating when the currency pair comes out from extreme oversold and overbought.
It can be used on any timeframe, but I recommend attaching this indicator on high timeframes. I checked this all is good instead of repaint.
I request if anyone will solve the repainting issue, I will be really thankful to him.
When reading crossed overbought or oversold levels and returning from medium or extreme level, the user will get a signal as a buy or sell arrow.