Skip to content

Free MT5 indicator

Stochastic RSI Zones

Stochastic RSI %K and %D for MT5 with overbought and oversold zones and arrows when %K leaves an extreme zone.

Momentumv1.0MetaTrader 5 (MQL5) Compiles with 0 errors Non-repainting signals Alerts

What it does

Stochastic RSI Zones shows where the RSI sits within its own recent range, scaled from 0 to 100. A fast %K line and a slower %D line move between an overbought zone above 80 and an oversold zone below 20.

Instead of flagging every time the line touches an extreme, the indicator marks the moment %K leaves a zone on a closed bar: an up arrow when it climbs back above 20 and a down arrow when it falls back below 80.

How it works

  1. RSI is calculated with Wilder smoothing over 14 bars.
  2. Raw Stochastic RSI = 100 × (RSI − lowest RSI) ÷ (highest RSI − lowest RSI), using the last 14 RSI values. If the range is zero, the previous value is kept.
  3. %K = simple moving average of the raw value over 3 bars. %D = simple moving average of %K over 3 bars.
  4. Oversold exit: %K closes above the lower level after being at or below it on the bar before. Overbought exit: %K closes below the upper level after being at or above it.
  5. With the optional filter on, an oversold exit also needs %K above %D and an overbought exit needs %K below %D.

How to use it

  • Zone exits are momentum turns, not trend signals. They work best when they agree with the trend on the same or a higher timeframe, for example oversold exits during an uptrend's pullbacks.
  • In strong trends the line can stay pinned in one zone for a long time. Exits against that trend tend to be short-lived.
  • Combine exits with price structure such as support and resistance or a trendline touch.
  • Stochastic RSI is faster than plain RSI, which makes it popular on M15 to H4 for timing entries inside a larger bias.
  • Read RSI Indicator to understand the input series.

Settings

InputDefaultWhat it changes
RSI length14Speed of the underlying RSI
Stochastic lookback on RSI14Range window; shorter makes the oscillator jumpier
%K smoothing3Noise reduction on the main line
%D smoothing3Speed of the signal line
Overbought / oversold level80 / 20Where the zones begin
Require %K above/below %DfalseFewer, slightly later exit arrows when on
Pop-up alert / Push notificationfalse / falseOne alert per closed bar on a new zone exit

Limitations

  • Stochastic RSI is very sensitive. It swings from one extreme to the other quickly and produces many signals on low timeframes.
  • A zone exit says nothing about how far price will move.
  • Because it is an oscillator of an oscillator, small changes in price can cause large changes in the line.
  • %K and %D on the live bar change with each tick; arrows and alerts appear only after the bar closes and are then fixed.
  • Use it with a clear plan, a stop-loss and position sizing. Trading involves substantial risk of loss.

Key inputs

Key inputs of Stochastic RSI Zones
InputDefaultDescription
RSI length14Period of the underlying Wilder RSI.
Stochastic lookback on RSI14Bars over which RSI's highest and lowest values are measured.
%K smoothing3Simple average applied to the raw Stochastic RSI.
%D smoothing3Simple average of %K.
Overbought / oversold level80 / 20Boundaries of the extreme zones.
Require %K above/below %D for the exit arrowfalseAdds a %K/%D agreement check to zone exits.

Educational tools, not advice. Indicators and Expert Advisors describe price; they do not predict it, and past behaviour does not guarantee future results. Test everything on a demo account first and never risk money you cannot afford to lose. See our disclaimer.

Keep exploring

Related mt5 indicators