The super trend indicator trails a stop line on one side of price and flips it when price closes through. Band distance comes from ATR multiplied by Multiplier, so the stop widens as volatility rises. SuperTrend Up and SuperTrend Down carry the two sides, with arrows on each flip.
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 | 4: SuperTrend Up, SuperTrend Down, Buy, Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 11 |
What the Super Trend Indicator draws on the chart
SuperTrend Up (blue) is the trailing stop drawn below price while the trend reads long.
SuperTrend Down (tomato) is the stop above price while the trend reads short.
Buy (lime, code 233) marks the bar where the trend flips to the long side.
Sell (red, code 234) marks the flip going the other way.
- SuperTrend Up: line, dodger blue, width 2
- SuperTrend Down: line, tomato, width 2
- Buy: arrow, lime, width 2, arrow code 233
- Sell: arrow, red, width 2, arrow code 234

How the Super Trend Indicator calculates its values
The raw bands
Every bar starts from its median, meaning the high and low averaged. ATR over AtrPeriod bars gets multiplied by Multiplier, then added above and subtracted below to give a raw upper and lower band.
Those raw bands jump around a lot, which is why neither one reaches a plot directly.
Ratcheting the bands
Each band gets compared against its own previous value and against the previous close. A band may only move in the direction that tightens it, which turns a raw band into a trailing stop.
What comes out is a line that follows price up during a rise and refuses to fall back with it.
Flipping the trend
Trend state carries forward from bar to bar. A short state flips long once the close pushes above the upper stop, and a long state flips short once the close drops below the lower one.
AnchorYear, AnchorMonth and AnchorDay set an optional start date. Leave all three at 0 and the calculation covers the whole chart.
How to read the signals
Whichever side the line sits on tells you the current state. Below price reads long, above price reads short.
Distance between price and the line is the current room ATR allows, not a target.
A flip prints one arrow. Between flips the line simply trails.
A line that has stopped tightening for several bars means ATR widened enough to hold it still.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
Alerts cover popup, push, email and sound on a trend flip. A bar time check keeps it to one alert per closed bar.
Every Super Trend Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
AtrPeriod |
AtrPeriod is the volatility window behind the band width. It defaults to 10. | 10 |
Multiplier |
Multiplier sets how many ATRs the band sits from the median, 3.0 by default. Lowering it towards 2.0 tightens the stop and produces more flips. | 3.0 |
AnchorYear |
AnchorYear starts the calculation from a chosen year. It defaults to 0, which means no anchor. | 0 |
AnchorMonth |
AnchorMonth is the month half of that date, 0 by default. | 0 |
AnchorDay |
AnchorDay is the day half, also 0. All three need real values for an anchor to take effect. | 0 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
(see inputs panel) | on |
EnablePopup |
(see inputs panel) | on |
EnablePush |
EnablePush sends each flip to the MT4 mobile app. It defaults to false. | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Settings that fit your chart
The screenshot uses EURUSD H1. A ten bar ATR with a three times multiplier is a wide setting that suits trending conditions on H1 and above. On lower timeframes the flips come often enough that the trailing behaviour never develops. Lowering Multiplier tightens it, at the cost of leaving moves that continue.
When the Super Trend Indicator fails
This is a trailing stop, not a forecast. A flip happens after price has already moved through the band.
In a sideways market the two sides flip back and forth and the stop offers no protection at all.
Band width follows ATR, which rises after a fast move rather than before it. The stop sits widest exactly when the market has already turned dangerous.
Those anchor inputs are all or nothing. Setting two of the three and leaving the third at 0 produces no partial anchor.
Copy the compiled Super 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.
Download the Super Trend Indicator for MT4 and MT5
The zip holds the compiled Super 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
What does Multiplier at 3.0 do to the stop distance?
It puts the band three ATRs away from each bar median. At AtrPeriod 10 that is a wide stop tolerating a lot of movement before it flips. Lowering Multiplier towards 2.0 pulls the line closer to price, which catches turns sooner and produces more false flips.
Why does SuperTrend Up never move back down?
Each band gets compared against its own previous value and the previous close, then allowed to move only in the tightening direction. So while the trend reads long that lower stop can rise with price but never fall back. This ratchet is what makes it a trailing stop rather than a band.
What do the AnchorYear, AnchorMonth and AnchorDay inputs do?
They set an optional date for the calculation to begin from. All three default to 0, meaning no anchor and a run across the whole chart. Set a real date and everything before it drops out, which helps when you only care about behaviour since a known event.
Does a SuperTrend Up flip count as a signal?
It is a state change that the code marks with an arrow. The line has crossed price and the trend variable changed sides, nothing more. Whether that deserves action depends on context this build never measures, such as the wider trend or the session.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Super Trend 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
- For background on this concept, see Dead cat bounce on Wikipedia.
- For broader market context, see Backtesting at Investopedia.
