Super Trend Profit Indicator: One Line, Two Colours

Written by Dominic Walsh · Published · Last updated

The super trend profit indicator draws one line at a time. Two bands sit `Multiplier` times ATR either side of the bar midpoint. Only the band on the trend side shows, in lime green below price or medium orchid above it. Neither band ever loosens while the trend holds.

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 Main price chart
Plots 2: Supertrend Up, Supertrend Dn
Alerts popup, push notification, email, sound
Inputs 8

What the Super Trend Profit Indicator draws on the chart

Supertrend Up is the lime green line trailing below price in an uptrend.

Supertrend Dn is the medium orchid line trailing above price in a downtrend.

One colour shows at a time, and the swap is the trend change.

Nothing draws before the ATR window has filled.

  • Supertrend Up: plot, lime green
  • Supertrend Dn: plot, medium orchid
Super trend profit indicator on EURUSD H1 with the ratcheting band in two colours
Super trend profit indicator on EURUSD H1 with the ratcheting band in two colours

How the Super Trend Profit Indicator calculates its values

Averaging the true range

tr takes the largest of the bar range and the two gaps to the previous close. atr then averages `AtrPeriod` `21` of those values. Counting the gaps means an opening jump widens the bands instead of being ignored.

Placing the two bands

mid takes high plus low over two. up takes mid minus `Multiplier` `3` times atr, and dn takes mid plus the same distance. Anchoring to the midpoint rather than the close keeps the bands steadier through a long wick.

Ratcheting and switching

While the previous close sat above the up band, up takes the higher of the new value and the old one. The dn band takes the lower. trend_dir switches to 1 when the close clears the dn band and to minus 1 when it breaks the up band.

How to read the signals

Line colour is the trend reading, and the swap point is the signal.

The distance from price to the line is roughly three ATR at a fresh switch.

A line that has stopped moving means the midpoint has stopped extending.

Switches cluster in a range, which is normal for any trailing band.

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

`EnableAlerts` ships on and `EnablePopup` carries the message. `EnablePushNotify`, `EnableEmail` and `EnableSound` stay off by default. `SoundFile` names the clip. The switch test reads a closed bar, so one message follows each completed bar.

Every Super Trend Profit Indicator input

Core settings

Setting What it does Default
AtrPeriod Bars in the ATR average, default `21`. 21
Multiplier Band distance in ATR units, default `3`. Lower it for a tighter line and more switches. 3

Alert settings

Setting What it does Default
EnableAlerts Switches the trend alerts on as a group, default `true`. on
EnablePopup Raises the terminal dialog on a trend switch, default `true`. on
EnablePushNotify Sends the switch to the MetaTrader mobile app, default `false`. off
EnableEmail Mails the switch through the terminal, default `false`. off
EnableSound Plays a file on a trend switch, default `false`. off
SoundFile Name of the wav file the trend alert uses, default `alert.wav`. alert.wav
Super trend profit indicator inputs: AtrPeriod and Multiplier
Super trend profit indicator inputs: AtrPeriod and Multiplier

Settings that fit your chart

A three-ATR band is generous, so it suits markets that run rather than drift. EURUSD H1 is the reference chart, where `AtrPeriod` at `21` covers about a day. On M5 the line switches sides several times a session. On H4 a single colour stretch can last a week.

When the Super Trend Profit Indicator fails

The line reacts to closes that have already happened, so a switch always arrives after the turn.

In a sideways market the two bands trade places repeatedly and give back their distance each time.

`Multiplier` `3` is wide. A tighter setting exits sooner but switches far more often.

Copy the compiled Super Trend Profit 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 Super Trend Profit Indicator: Profit warning on Wikipedia, Trailingstop at Investopedia.

Download the Super Trend Profit Indicator for MT4 and MT5

The zip holds the compiled Super Trend Profit 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

What does Multiplier at 3 set on the bands?

Their distance from the bar midpoint, measured in average true ranges. At `3` on a chart where ATR reads 20 pips, the line sits 60 pips away when it first forms. Lower it to 2 for a tighter line that gives back less but switches more often.

Why does Multiplier hang off the bar midpoint?

Because the midpoint of high and low is steadier. A bar with a long wick and a close near one end would jerk a close-anchored band around. Using mid keeps the two bands smoother without changing what the ATR distance means.

Can the Supertrend Up line move down?

No, not while the trend reads up. The code takes the higher of the freshly calculated band and the previous one, so the line holds or rises. It only leaves that side when price closes through the opposite band and the direction switches.

Does AtrPeriod at 21 suit H1?

It works well there, covering about a trading day of range on EURUSD H1. Shorten it and the bands react faster to a volatility change, which brings switches forward. Lengthen it for a line that ignores a single busy session.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Super Trend Profit Indicator as one input. Always backtest before trading live.

Category: this is part of our Trend collection. Browse more Trend 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