Noon Barbari
Indicators

HalfTrend

A latched trend line built from channel extremes: it ratchets one way until price decisively breaks the other way.

HalfTrend (popularised by the Pine Script published by everget) draws a single stepped line under price in an uptrend and above price in a downtrend. Instead of ATR bands it uses raw channel extremes: the highest high and lowest low of the last N bars (the “amplitude”), together with N-bar moving averages of the highs and lows.

The line is latched: while the trend is up it only ratchets upward (tracking the ratcheted lowest-low level), and while the trend is down it only ratchets downward. A flip needs two things at once — the average of the lows (or highs) must cross the ratcheted extreme of the opposite side, and the close must break beyond the previous bar's high (or low). That double condition makes HalfTrend noticeably less flip-happy than a plain moving-average cross.

On a flip bar the new line starts exactly where the old line stood, so the indicator never gaps — it bends. Traders use it like SuperTrend: the line is the trailing stop, the side of the line is the trend filter, and flips are entry/exit signals.

Example

Amplitude 2, downtrend line at 51,000. The 2-bar average of lows crosses above the ratcheted lowest-high and the close breaks the previous bar's high — HalfTrend flips: the up line starts at 51,000 and begins ratcheting upward beneath price.

How Noon Barbari uses HalfTrend

Every concept here is implemented in the platform. Open the relevant docs or tool to see it in action.

Use HalfTrend in noonbarbari

Indicators using this concept

Related terms

Back to glossary