Two choices define the rsi trend indicator: a very short 5-bar lookback and thresholds pushed out to 75 and 25. Those go together. A 5-period RSI covers its whole range within a few candles, so the usual 70 and 30 would trigger constantly. Widening the bands keeps the alerts tied to genuinely one-sided stretches. The output is a single line in its own pane.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Separate window |
| Plots | 1: RSI |
| Alerts | popup, push notification, email, sound |
| Inputs | 9 |
What the Rsi trend Indicator draws on the chart
RSI is the sole plot, drawn in deep sky blue in a separate window.
The thresholds live in the inputs panel rather than as drawn lines.
There are no arrows, markers or price-chart objects in this build.
A 5-period line looks noticeably more jagged than a standard RSI, which is expected at that lookback.
- RSI: plot, deep sky blue

How the Rsi trend Indicator calculates its values
Accumulating the window
diff takes close[i – k + 1] minus close[i – k] across the lookback, with positives collecting into gain and negatives into loss. Only five bars feed each reading at the default, which is why the line moves so far between candles.
The ratio form
rs takes gain over loss, guarded so a zero loss short-circuits to a reading of 100.0. RsiBuf[i] then applies 100.0 minus 100.0 over (1.0 + rs). This is the direct ratio calculation rather than Wilder’s smoothed averages, so expect small differences against MetaTrader’s built-in oscillator.
Alerting from the newest closed bar
latest takes rates_total – 1 and the threshold comparison runs from there. With `OverboughtLevel` at `75` and `OversoldLevel` at `25` the bands sit five points wider than convention on each side, which is the adjustment that makes a 5-period reading usable.
How to read the signals
Expect a jagged line. At five bars the oscillator is measuring a very short window.
The wide thresholds are doing real work: at 70 and 30 this reading would sit outside the bands much of the time.
Nothing is drawn on the price chart, so the alerts carry the signal.
A reading that stays beyond 75 across several bars describes a genuinely one-sided run.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
Four channels sit beneath `EnableAlerts`: popup, push notification, email and sound, with `SoundFile` naming the clip. Popup ships enabled. Because the build draws no markers, these messages are the only signal delivery, and the guard permits one per closed bar.
Every Rsi trend Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
Period |
The RSI lookback, default `5`. This is a deliberately fast setting; raising it toward 14 would also mean pulling the thresholds back in. | 5 |
OverboughtLevel |
Upper threshold, default `75`, five points wider than convention to suit the short period. | 75 |
OversoldLevel |
Lower threshold, default `25`, mirroring it. | 25 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
(see inputs panel) | on |
EnablePopup |
(see inputs panel) | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Settings that fit your chart
A 5-bar oscillator describes the immediate past, which suits intraday charts where you care about the last few candles. On M15 and H1 the readings turn quickly and the wide thresholds keep alerts manageable. On the daily chart five bars is a full trading week, so the same settings behave much more like a conventional RSI.
When the Rsi trend Indicator fails
The name suggests a trend tool, but the build is a short-period oscillator with no trend logic, no direction state and no signal markers.
Five bars is a very small sample. One large candle can swing the reading from mid-range to an extreme.
During a sustained move the oscillator pins near a threshold, so the alerts stop discriminating exactly when the market is trending hardest.
Copy the compiled Rsi trend 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 trend Indicator: Indication of interest on Wikipedia, Accumulation Distribution Line at StockCharts ChartSchool.
Download the Rsi trend Indicator for MT4 and MT5
The zip holds the compiled Rsi trend 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
Why are OverboughtLevel and OversoldLevel set at 75 and 25?
Because they have to be, at this lookback. A 5-period RSI covers its whole range within a few candles, so conventional 70 and 30 thresholds would trigger constantly and mean very little. Pushing them out five points each way keeps the alerts tied to stretches that are genuinely one-sided.
Is this really a trend indicator?
Not in any usual sense, and the name is misleading. The build plots one RSI line and compares it against two thresholds. There is no trend state, no direction buffer and no signal marker anywhere in it. Treat it as a fast momentum reading rather than a trend tool.
What does Period at 5 change compared with 14?
Everything about how the line behaves. Five bars means each reading reflects only the last few candles, so the oscillator swings far and fast, and a single large candle can move it dramatically. Fourteen smooths that out. If you raise the period, pull the thresholds back toward 70 and 30 to match.
Does the RSI plot draw the OverboughtLevel and OversoldLevel lines?
No. Both are numeric inputs that the alert comparison uses. The build declares one plot, the RSI line, and nothing else. Add horizontal lines to the indicator window yourself if you want to see where the thresholds sit.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Rsi trend 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
- The core method is documented in Indication of interest on Wikipedia.
- Additional market context is at Accumulation Distribution Line at StockCharts ChartSchool.
