Concept

Halftrend

Halftrend is a Trend concept. The Library holds 1 implementation, a working definition you can pull into Quant.

Top Halftrend indicator

The top custom implementation, built on the original standard Halftrend formula.

1 total

Want to trade Halftrend? The implementation below is one prompt away from a backtested strategy in Quant.

What is Halftrend?

Halftrend is a trailing trend line known for going flat when the market pauses. Over an 'amplitude' lookback it tracks the lowest low while in an up state, ratcheting the line higher only when that floor rises, and the highest high while in a down state, stepping the line lower as the ceiling falls. The state flips when a moving average of the highs (or lows) crosses through the line's level with price confirming, and most versions wrap the line in a half-width ATR channel and mark each flip with an arrow.

The indicator is community-bred: it emerged from the MetaTrader ecosystem, circulated through forum ports for years without a canonical paper or named inventor, and reached its current popularity through widely used TradingView conversions. That lineage explains its loose edges, since implementations differ in small ways (flip conditions, channel width, default settings), and any serious use starts by reading the exact port in hand.

It belongs to the stop-and-reverse family alongside Supertrend and NRTR: one line, two states, flips traded as signals. Its signature is the long horizontal shelf during consolidation, which avoids the drift a moving average shows in chop, though not the whipsaw; tight ranges can still flip it repeatedly, and the flat line always concedes some lag at genuine turns.

The flat shelf is the design's actual content. A moving average keeps sliding toward price during a pause, quietly eroding the distance a trailing stop enjoys; Halftrend's ratchet only moves on new extremes, so consolidation leaves both the line and any stop referenced to it exactly where the last thrust put them. The price of that stillness is paid at reversals, where the line waits for its crossing condition while a faster trail would already have flipped.

How to read Halftrend on a chart

One line, two states: the reading is the state, the shelf, and the flip.

  1. 1Plot the indicator with its amplitude setting (2 is a common default) and note the state by color or position: line below price is the up state, above price the down state.
  2. 2Read the shelf: a flat line during consolidation means no new extreme has printed; the trend thesis is paused, not broken.
  3. 3Watch the ratchet: each step of the line marks a fresh extreme in the trend's direction, the indicator's definition of progress.
  4. 4Treat the arrows as state flips, not automatic trades: each is the crossing condition firing, and in ranges they alternate quickly.
  5. 5Use the ATR half-channel as the buffer zone: wicks inside it are noise by construction, and stops referenced outside it survive ordinary backfill.
  6. 6Filter by a higher timeframe: flips against the larger trend state are the ones that historically whipsaw most.

How traders use it

  • As a regime filter: the line's state gates direction, with longs considered only above a rising line and shorts only below a falling one.
  • As flip signals: the arrows at state changes serve as entry or exit triggers, typically filtered by higher-timeframe bias because range-bound flips are frequent and unreliable.
  • As a trailing reference: the flat shelf and its ATR channel give a stop location that stays put through pauses instead of creeping toward price.
  • As a partner to breakout logic: a flat shelf under a tightening range plus a breakout close beyond the range is a natural pairing, the shelf marking where the failed-break case is proven.
  • As one layer in a trend stack: agreement between Halftrend's state, an MA slope filter, and a broader trend regime label makes a sturdier gate than any single flip line.

Halftrend vs other trailing state tools

Supertrend: Supertrend trails price at an ATR multiple, so its line drifts with volatility and flips on a simple price cross. Halftrend anchors to recent extreme highs and lows and flips on a moving-average condition, sitting flat where Supertrend tightens.

Moving Average Crossovers: Crossovers derive state from two smoothed consensuses crossing, which drifts continuously and lags symmetrically. Halftrend derives state from extremes and ratchets, so it holds still in pauses and steps discretely with new highs or lows.

MA Slope Filter: A slope filter grades trend by the gradient of one average, a continuous measure with no levels attached. Halftrend outputs a level (the line and its channel) plus a binary state, which is why it doubles as a stop reference while a slope read cannot.

Concept family

Trend

100 concepts mapped · 100 in the Library

Halftrend FAQ

Turn Halftrend into a trading strategy.

Take the implementation from this page into Quant, then build on it, backtest it on real data, and keep refining it in conversation.