Trend following

Supertrend Trend Following

A clean, binary trend signal that doubles as a trailing stop.

Supertrend plots a single ATR-based line that flips above or below price. When price closes through it, the trend is assumed to flip, giving an unambiguous signal that also serves as a trailing stop.

How it works

Because it's built on ATR, Supertrend widens in volatile conditions and tightens in calm ones, adapting its trailing distance automatically. Trading every flip generates whipsaws in ranges, so a higher-timeframe trend filter improves results.

Entry rules

  • Go long when Supertrend flips below price; short when it flips above.
  • Optionally only take flips aligned with a higher-timeframe Supertrend or trend filter.

Exit & risk

  • Exit on the opposite flip (the line is your trailing stop).
  • Optionally take partial profit at a measured target.

Best for

Trending markets. In ranges it flips often; multi-timeframe alignment or an ADX filter reduces the noise.

Build this strategy in Algovex

Every component of this strategy is a node in Algovex — drop them on the canvas, connect the logic, backtest on a real engine, and export to code. No programming required.

Key terms

Frequently asked questions

Can Supertrend be used as a trailing stop?

Yes, because the line trails price at an ATR-based distance and flips on a close through it, many traders use Supertrend itself as a dynamic trailing stop. Algovex exposes its flip events so you can both enter and trail with it.