Forex
Indicator

Indicator: What Is SuperTrend? An ATR-Based Stop-and-Reverse Trend Line

Last updated 2026-07-31

SuperTrend is a trend-following overlay that plots a single line directly on the price chart, switching color and position depending on which side is currently in control: below price and colored green during an uptrend, where it acts as a trailing support level, and above price and colored red during a downtrend, where it acts as a trailing resistance level. Unlike an oscillator confined to its own panel, SuperTrend is read the same way price action itself is read — as long as the line sits below candles, the trend is up; the moment it flips to sit above candles, the trend has turned down. Its band width comes from ATR, which means — like Keltner Channels — it automatically widens during volatile stretches and tightens during quiet ones, rather than sitting at a fixed pip distance regardless of conditions.

How SuperTrend Is Calculated

The calculation builds two candidate bands from ATR, then decides which one becomes the actual SuperTrend line:

  1. Basic Upper Band = (High + Low) / 2 + (Multiplier × ATR).
  2. Basic Lower Band = (High + Low) / 2 − (Multiplier × ATR).
  3. Final bands — each final band only moves in the direction that tightens the trail: the Final Upper Band only moves down (or stays put if the new Basic Upper Band would widen it and price hasn't closed above it), and the Final Lower Band only moves up under the mirrored condition. This "ratchet" behavior is what makes the line trail price rather than jump around with every new ATR reading.
  4. The line itself — while the trend is up, the plotted line equals the Final Lower Band, sitting below price as a rising support level. The instant a closed bar's price drops below that level, the trend flips to down and the line switches to the Final Upper Band, now sitting above price as a falling resistance level — and the process mirrors in reverse for a flip back up.

Because each bar's final bands and trend state depend on the bar before it, SuperTrend is a recursive, stateful calculation — closer in spirit to Parabolic SAR than to a simple moving average. There's no built-in SuperTrend function in either MetaTrader 4 or MetaTrader 5, so supertrend-alert.mq4/.mq5 reconstruct this full recursive sequence internally from High, Low, Close, and ATR rather than wrapping a platform indicator call.

Entry Conditions

PriceBUYSELLLine above price (downtrend / resistance)Line below price (uptrend / support)
Entry conditions: BUY when the line flips from above price to below price — SELL when the line flips from below price to above price

The signal is the flip itself: when the line switches from above price to below price, the trend has turned up and it's read as a bullish signal; when it switches from below price to above price, the trend has turned down and it's read as a bearish signal. The alert logic in supertrend-alert.mq4/.mq5 compares the trend state of the two most recently closed bars and fires the moment a flip is detected, the same closed-bar-confirmation approach used across every trend indicator on this site.

SuperTrend vs Parabolic SAR

Both SuperTrend and Parabolic SAR are stop-and-reverse trend tools that plot a single trailing line which flips sides to signal a trend change, and both can double as a ready-made trailing Stop Loss level — but they derive that line from very different inputs. Parabolic SAR accelerates its own step size the longer a trend runs, independent of how large individual candles actually are; a trend that's persisted for many bars produces a SAR line that catches up to price quickly regardless of current volatility. SuperTrend instead ties its distance from price directly to ATR at every bar, so its trail width breathes with actual market volatility rather than with how long the trend has lasted — a sudden volatility spike widens the SuperTrend line's distance from price immediately, where Parabolic SAR wouldn't react to that at all.

In practice this makes SuperTrend feel more forgiving during a volatile pullback within an established trend (the wider ATR-scaled trail is less likely to be tagged by a normal-sized retracement), while Parabolic SAR tends to trail tighter and flip sides sooner once a trend has been running for a while. Neither is strictly better — a tighter trail locks in profit sooner but exits more trades on noise, and a volatility-adaptive trail rides further but gives back more open profit before flipping.

Parameters

  • ATRPeriod (default 10) — the lookback ATR is calculated over for band width. A shorter period reacts to recent volatility changes faster; a longer period smooths the bands but lags a genuine shift in volatility.
  • Multiplier (default 3.0) — how many ATR-widths the bands sit from the (High+Low)/2 midpoint before the ratchet logic is applied. A smaller multiplier (1.5-2.0) produces a tighter trail that flips sides more often; a larger multiplier (3.5-4.0) requires a bigger adverse move before flipping, holding a trend longer at the cost of giving back more profit on the eventual reversal.
  • EnableAlert / EnablePush — toggle the on-screen popup alert and mobile push notification independently when the line flips sides.

How Traders Combine SuperTrend with Other Tools

Because SuperTrend is designed to stay on one side of price for an extended stretch, it's commonly used as a trend filter for a faster entry signal rather than as the entry trigger itself — only taking a Moving Average crossover or an oscillator signal in the direction SuperTrend currently favors, for example, filters out signals that would otherwise fight the dominant trend. It also pairs naturally with ADX: a SuperTrend flip that occurs alongside a rising ADX reading carries more weight than one occurring while ADX sits flat near a low reading, where the flip is more likely to be noise inside a genuinely range-bound market rather than the start of a real trend.

A Word of Caution

Like Parabolic SAR, SuperTrend is built to shine in a sustained trend and to struggle in a ranging one — during sideways price action the line can flip back and forth repeatedly, with each flip looking identical to a genuine trend change at the moment it happens, generating a rapid sequence of losing signals known as whipsaw. A larger Multiplier reduces how often this happens but never eliminates it, since no fixed multiplier can distinguish a genuine trend from a wide, choppy range after the fact. As with any trend-following tool, SuperTrend confirms a shift that has already begun — it cannot confirm in advance that the new trend will continue, and treating every flip as a standalone signal without checking broader market structure first is the most common way to misuse it.

Download the Indicator

This custom indicator plots the SuperTrend line, switching between a green up-trend segment below price and a red down-trend segment above price, and alerts on a flip. It's available for both MetaTrader 4 and MetaTrader 5 below.

How to Install — MetaTrader 4

  1. Download the supertrend-alert.mq4 file below.
  2. Open MetaTrader 4 → click FileOpen Data Folder.
  3. Place the file in the MQL4/Indicators folder.
  4. Restart MetaTrader 4, then drag the indicator from the Navigator window onto the chart.

How to Install — MetaTrader 5

  1. Download the supertrend-alert.mq5 file below.
  2. Open MetaTrader 5 → click FileOpen Data Folder.
  3. Place the file in the MQL5/Indicators folder.
  4. Restart MetaTrader 5, then drag the indicator from the Navigator window onto the chart.

Both files are source code — open and review the full code before using it, for your own safety.

Download supertrend-alert.mq4

For MetaTrader 4 — this is source code (.mq4), open and review it fully before using it.

Download File

Download supertrend-alert.mq5

For MetaTrader 5 — this is source code (.mq5), open and review it fully before using it.

Download File