Two primary conditions define extremely overbought and oversold states. The first condition is that the price must deviate by two standard deviations from the 20-day Simple Moving Average (SMA). The second condition is that the 3-day SMA of the 14-day Stochastic Oscillator (STO) derived from the 14-day Relative Strength Index (RSI) is above or below the upper or lower limit.
Oversold states arise when the first condition is met and the 3-day SMA of the 14-day Stochastic RSI falls below the lower limit, suggesting a buy signal. These are visually represented by green triangles below the price bars. Overbought states arise when the first condition is met and the 3-day SMA of the 14-day Stochastic RSI rises above the upper limit, suggesting a sell signal. These are visually represented by red triangles above the price bars. It's also possible to set up automated alerts to get notifications when either of these two conditions is met to avoid missing out.
While this indicator has traditionally identified overbought and oversold conditions in various different assets, past performance does not guarantee future results. Therefore, it is advisable to supplement this indicator with other technical tools. For instance, trend indicators can greatly improve the decision-making process when planning for entries and exit points.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.