Stoch RSI Band Fill with Cross Alerts
- Göstergeler
- Sürüm: 1.2
- Güncellendi: 9 Kasım 2026
Stoch RSI Band Fill is a Stochastic RSI indicator for MetaTrader 5. MT5 does not include a built-in Stoch RSI, so this indicator adds one. It follows the same calculation steps as the built-in Stoch RSI on TradingView and uses the same layout: K and D lines, 80 / 50 / 20 levels and a shaded band between the upper and lower levels.
CALCULATION, STEP BY STEP
1. RSI of the selected price (default: close, length 14), smoothed with Wilder's method (RMA). The first average is the simple average of the first 14 price changes.
2. Stochastic of that RSI over the Stochastic Length (default 14): 100 x (RSI - lowest RSI) / (highest RSI - lowest RSI).
3. K = SMA of the stochastic (default 3). D = SMA of K (default 3).
When the highest and lowest RSI in the window are equal, the denominator is zero (this happens when price has not moved). In that case the previous value is kept, which is what TradingView does.
COMPARISON WITH TRADINGVIEW
- We took TradingView's own price data, ran this calculation on it and compared the result with TradingView's values. The largest difference was about 1e-14, which is floating-point rounding.
- Zero-denominator bars: in a test that contained 425 such bars, the output followed TradingView's rule on every one of about 675,000 bars.
- Please note: your MT5 chart will still show slightly different values from a TradingView chart, because brokers and data feeds deliver slightly different prices. The calculation is the same; the input prices are not.
- The RSI smoothing also depends on where the chart history begins. After a few hundred bars this effect becomes negligible.
ON THE CHART
- K line (blue) and D line (orange). Their values appear in the Data Window.
- Upper band 80 and lower band 20 (dashed), middle line 50 (dotted). Each can be switched off.
- Shaded band between the upper and lower levels. MT5 cannot draw semi-transparent areas, so the fill color is mixed with your chart background at the opacity you choose (default 10%). If you change the chart background, the fill color adjusts automatically.
- The shaded band can continue into the empty space on the right of the chart (default 100 bars; 0 turns it off).
- Three scale modes:
Fixed 0-100 (default)
Auto - the normal MT5 autoscale
Clamped - scales to the K and D values on screen but never goes below 0 or above 100; the band levels stay in view while the bands or the fill are shown
ALERTS (switched off until you turn them on)
- K crosses D, upward or downward.
- K crosses above the upper band, or below the lower band.
- Checked only on the bar that has just closed, at most once per bar for each condition. Loading the indicator or loading more history does not trigger alerts for past bars.
- Choose any combination of pop-up, sound and push notification. Push notification requires your MetaQuotes ID in the terminal settings.
- Alert messages are in English or Japanese, following the terminal language. You can also fix the language in the inputs.
- An alert only tells you that a line has crossed. It is not a recommendation to buy or sell.
BEFORE YOU USE IT
- Repainting: closed bars are not redrawn. The current bar keeps changing until it closes.
- Stoch RSI reacts quickly. In a strong trend, K and D can stay near 0 or near 100 for a long time, and in quiet markets small price moves can swing them widely. A reading above 80 or below 20 does not by itself mean that price will reverse.
- Load time in our test: about 0.8 seconds for roughly 10 million M1 bars. It depends on your computer.
- Works on any symbol and timeframe. No DLLs, no external files, no internet connection.
- This is a charting and analysis aid. It does not place orders and does not guarantee any trading result.
- Support covers installation, settings and bug reports.
INPUTS
Stoch RSI
- K (3), D (3), RSI Length (14), Stochastic Length (14) - each 1 to 1000
- RSI Source (close): close, open, high, low, hl2, hlc3, ohlc4, hlcc4
Levels
- Upper Band (80), Lower Band (20) - Lower must be below Upper, both within 0-100
- Show upper/lower band lines (on), Show middle line 50 (on), Show background fill (on)
- Extend fill to the right (100 bars, 0-5000)
Colors
- K line, D line, Band / middle lines, Background fill color
- Background fill opacity % (10, range 1-100)
Scale
- Scale mode (Fixed 0-100)
Alerts
- K crosses D (off), K crosses above upper / below lower band (off)
- Pop-up (on), Sound (off), Push notification (off)
- Alert language (Auto)
This indicator is one of my MT5 tools built to match TradingView's chart style, together with RSI AutoScale with Zone Fills and MACD Four Color Histogram with Alerts. All of them are listed on my seller profile.
TradingView is a trademark of TradingView, Inc. This product is not affiliated with or endorsed by TradingView, Inc.
