SuperTrend Oscillator Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

A SuperTrend line tells you the side; the distance from it tells you how stretched price is. The SuperTrend oscillator indicator measures the close against its active SuperTrend line in units of the band width, maps that onto 0 to 100 around a 50 midline, and smooths it with a five-bar average.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Separate window (levels 30 / 50 / 70)
Plots 3: SuperTrend Osc, Buy, Sell
Alerts popup, push notification, email, sound
Inputs 12

Plots, colours and placement

One line and two marks in a pane.

`SuperTrend Osc` traces dodger blue at width 2.

`Buy` sits on the line in lime.

`Sell` sits on the line in red.

Guides sit at 30, 50 and 70.

A comment lists the settings.

  • SuperTrend Osc: line, dodger blue, width 2
  • Buy: arrow, lime, width 2, arrow code 233
  • Sell: arrow, red, width 2, arrow code 234
supertrend oscillator indicator: SuperTrend oscillator with zone exits, EURUSD H1.
SuperTrend oscillator with zone exits, EURUSD H1.

The mechanism

SuperTrend engine

`ATRPeriod` `14` and `Multiplier` `3.0` build the usual bands around the median price. A close through a band flips the side.

Scaling

Distance from the active line, divided by three ranges, moves the reading from 50. The build clamps it between 0 and 100.

Smoothing and marks

`SmoothPeriod` `5` averages the raw value. A climb back above `OverSold` `30.0` prints a buy; a drop under `OverBought` `70.0` prints a sell.

What each state tells you

Near 100 means price is far above its stop.

Near 0 means price is far below it.

Around 50 means price hugs the line.

A flip of the SuperTrend jumps the reading.

`SignalCooldown` `3` spaces same-side marks.

Warm-up needs about twenty bars.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

Zone exits send one message per closed bar. `EnableAlerts` gates them, with popup delivery the only route active when you first load the file.

Every SuperTrend Oscillator Indicator input

Core settings

Setting What it does Default
ATRPeriod ATR lookback for the SuperTrend engine. Range window for the bands, `14`. 14
Multiplier ATR band multiplier. Band width in ranges, `3.0`. 3.0
SmoothPeriod EMA smoothing of the raw oscillator. Smoothing of the raw reading, `5`. 5
OverBought Upper exhaustion reference. Upper exhaustion level, `70.0`. 70.0
OverSold Lower exhaustion reference. Lower exhaustion level, `30.0`. 30.0
SignalCooldown Min bars between same-side signals. Minimum gap before a repeat mark, `3`. 3

Alert settings

Setting What it does Default
EnableAlerts Master alert switch, `true`. on
EnablePopup Popup, `true`. on
EnablePushNotify Mobile route, `false`. off
EnableEmail (see inputs panel) off
EnableSound Speaker, `false`. off
SoundFile (see inputs panel) alert.wav
supertrend oscillator indicator: Inputs panel, band settings above the zones.
Inputs panel, band settings above the zones.

Chart choice

A stretch reading works on any trending chart. EURUSD H1 is the reference chart, with an exit from each zone every few days. On M15 lower `Multiplier` for livelier swings. On D1 zone exits mark real exhaustion.

Where the SuperTrend Oscillator Indicator struggles

Flips of the side make the reading jump.

Strong trends keep it pinned near an edge.

Zone exits come after the peak.

Only the popup is on by default.

Copy the compiled SuperTrend Oscillator 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.

Download the SuperTrend Oscillator Indicator for MT4 and MT5

The zip holds the compiled SuperTrend Oscillator 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.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

How does Multiplier 3.0 shape the reading?

It sets both the SuperTrend band width and the scale. Price one full band away from the line reads 0 or 100; halfway reads 25 or 75.

Why does the SuperTrend Osc line jump suddenly?

When price closes through the band, the active line switches sides. Distance is then measured from the new line, so the reading can leap across 50.

Which SuperTrend Osc move prints a lime Buy?

The smoothed reading climbing from 30 or below to above 30. The mark flags price pulling away from an extreme below its line, and it sits on the oscillator itself.

What does SmoothPeriod 5 remove?

Bar-to-bar jitter in the raw reading. A five-bar exponential average keeps the line readable while adding only a little lag, so zone exits stay close to the real turn.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the SuperTrend Oscillator 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

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment