The rsi indicator gives the classic reading something most versions lack. A short average runs over the top of it. That second line turns one number into a pair you can compare.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Separate window (levels 30 / 50 / 70) |
| Plots | 4: RSI, RSI Signal, RSI Buy, RSI Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 12 |
What the RSI Indicator draws on the chart
A dodger blue `RSI` line carries the reading.
A goldenrod `RSI Signal` line averages it at `InpSignalPeriod` `5`.
`RSI Buy` and `RSI Sell` mark the level crossings.
References sit at 30, 50 and 70.
- RSI: line, dodger blue, width 2
- RSI Signal: line, goldenrod, width 1
- RSI Buy: arrow, lime, width 2, arrow code 233
- RSI Sell: arrow, red, width 2, arrow code 234

How the RSI Indicator calculates its values
Wilder’s smoothing, written out
Average gain and average loss run at `InpPeriod` `14`. Each carries forward with the weighting Welles Wilder set out. The build works it out directly rather than calling the terminal.
The signal averages the reading
`InpSignalPeriod` `5` averages the reading, not price. So a crossing between the two lines speaks about momentum rather than the market.
Marks land on the line
Both signal buffers receive the current reading. Each mark then sits at the value that triggered it. A run of them stays easy to follow.
How to read the signals
The reading cannot leave 0 to 100, by construction.
`InpOverbought` `70.0` and `InpOversold` `30.0` are the two levels the marks use.
The signal line lags the reading, which is what makes a crossing possible.
`ShowSignal` clears the second line if you prefer the classic look.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` is the top-level control and ships true with `EnablePopup`. `EnablePushNotify` pushes to the mobile terminal, `EnableEmail` sends outgoing mail and `EnableSound` plays `SoundFile`. Those three arrive off, and every message waits for a bar to close.
Every RSI Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpPeriod |
RSI period. Length of the reading window, default `14`. | 14 |
InpSignalPeriod |
Signal-line SMA period (on RSI). Length of the average drawn over that reading, default `5`. | 5 |
InpOverbought |
Overbought level. Upper trigger level for a sell mark, default `70.0`. | 70.0 |
InpOversold |
Oversold level. Lower trigger level for a buy mark, default `30.0`. | 30.0 |
InpCooldownBars |
Min bars between same-side signals. Quiet bars enforced after each mark, default `3`. | 3 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ShowSignal |
Show the RSI signal (SMA) line. Plot the second line at all, default `true`. | on |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Master alert switch. Top-level control of the level alerts, default `true`. | on |
EnablePopup |
Popup alert. Pop-up inside MetaTrader at a crossing, default `true`. | on |
EnablePushNotify |
Push notification to mobile. Push to the mobile terminal at a crossing, default `false`. | off |
EnableEmail |
Email alert. Outgoing mail at a crossing, default `false`. | off |
EnableSound |
Sound alert. | off |
SoundFile |
Sound file. | alert.wav |

Settings that fit your chart
Fourteen bars behaves alike on most charts. EURUSD H1 is the reference chart. The reading covers over half a day there. On M5 it reaches both levels several times a session. Daily bars slow that right down.
When the RSI Indicator fails
A bounded reading pins at a level through a strong move and stays there.
The signal line adds lag on top of a reading that already lags.
Level crossings are frequent, which is why the cooldown exists.
Copy the compiled RSI Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Background reading on the method behind the RSI Indicator: Freeriding (stocks) on Wikipedia, Arthur Hill On Goals Style And Strategy at StockCharts ChartSchool.
Download the RSI Indicator for MT4 and MT5
The zip holds the compiled RSI Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
What does InpSignalPeriod 5 average?
The reading itself, not price. Five bars of it gives the goldenrod line. A crossing between the two then says momentum turned against its own recent average.
Why does InpCooldownBars 3 exist?
A reading sitting near thirty can cross the level several bars running. Each wobble would otherwise earn its own mark, and three bars of spacing keeps that down to one.
Does InpPeriod 14 use Wilder’s smoothing?
Yes. Average gain and average loss each carry forward with the weighting he set out rather than a plain mean. That is why the reading moves more slowly than a plain average would.
Can the RSI line leave the 0 to 100 range?
No. The arithmetic bounds it, since the result is a ratio of gains to total movement. That is also why a pinned reading is common during a strong one-way move.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the RSI Indicator as one input. Always backtest before trading live.
Category: this is part of our Oscillators collection. Browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- Learn more about the underlying method in Freeriding (stocks) on Wikipedia.
- For wider market background, see Arthur Hill On Goals Style And Strategy at StockCharts ChartSchool.
