Concept

Swing Structure Grammar

Swing Structure Grammar, also known as HH/HL/LH/LL, uptrend/downtrend/range definitions, structure mapping, is a Market Structure concept. The Library holds 29 implementations, each one a working definition you can pull into Quant.

Top Swing Structure Grammar indicators

29 total

What is Swing Structure Grammar?

Swing structure grammar is the labeling system that turns a series of swing highs and lows into a trend statement. Each confirmed swing is compared with the previous swing of the same type: a high above the prior high is a higher high (HH), below it a lower high (LH); lows label as higher lows (HL) or lower lows (LL). The resulting sequence of labels is the market's structure.

The reading rules descend from Dow Theory: an uptrend is a run of higher highs and higher lows, a downtrend a run of lower highs and lower lows, and anything overlapping or mixed is a range. The grammar stays intact until a defining swing gives way, which is where structure events are declared: a with-trend break is a break of structure, a counter-trend break a change of character.

The grammar matters because it makes trend an objective, testable property of price rather than an impression. That objectivity is conditional, though: the labels depend entirely on the swing-detection setting underneath, and the same chart can print a clean uptrend on external swings while internal structure chops sideways. Knowing which layer of structure you are labeling is most of the skill.

How to map swing structure

Structure mapping is mechanical once the swings are fixed; the discipline is keeping the rules constant.

  1. 1Detect swing highs and lows with a chosen strength. Every downstream label is relative to this setting, so hold it constant while you map.
  2. 2Label each confirmed swing against the last swing of the same type: HH or LH for highs, HL or LL for lows.
  3. 3Read the sequence: alternating HH and HL is an uptrend, LH and LL a downtrend, and overlapping labels with no progression mark a range.
  4. 4Track the defining swings. In an uptrend the most recent higher low protects the trend; when it breaks, the grammar either flips or degrades into a range, and the next few labels decide which.

How traders use it

  • As a trend filter: many systems only take longs while the chart prints HH/HL sequences, a price-anchored alternative to a higher-timeframe trend filter built from moving averages.
  • As the substrate for events: BOS and CHoCH are not independent signals; they are grammar statements about which labeled swing just broke, so the event stream is only as good as the labeling underneath it.
  • As an entry map: in an uptrend, each prospective higher low is a pullback location where continuation setups are hunted, with the prior swing as the natural invalidation.
  • As a multi-timeframe framework: mapping structure on a higher and a lower timeframe and requiring alignment between them filters counter-trend noise out of entries.

Swing structure grammar vs related concepts

Swing High/low: Swings are the raw pivots; the grammar is the labeling layered on top. You can detect swings without labeling them, but you cannot label structure without swings underneath.

Dow Theory: The ancestor. Dow defined trend as advancing peaks and troughs long before the HH/HL shorthand existed; swing structure grammar is that definition made mechanical enough to code.

Break of Structure: A BOS is a single event inside the grammar (a with-trend swing break); the grammar is the ongoing bookkeeping that makes such events definable at all.

Trend Regime Label: A regime label classifies trend from indicator conditions (slopes, bands, composites); structure grammar classifies it from the raw swing sequence. They often agree, and their disagreements tend to mark transitions.

More Swing Structure Grammar implementations

Related concepts · Swing grammar

Concept family

Market Structure

31 concepts mapped · 26 in the Library

Swing Structure Grammar FAQ

Is there one correct definition of an uptrend?

The common reading, inherited from Dow, is successive higher highs and higher lows. In practice definitions diverge on the details: which swing strength to use, whether a wick or a close breaks a swing, and whether internal or external swings count. Structure claims are only comparable when made under the same rules, so state your conventions explicitly.

What officially ends an uptrend in market structure terms?

The most common convention: the uptrend is in question once the most recent higher low breaks (a change of character), and a downtrend is confirmed once price then prints a lower high and breaks a lower low. A single broken swing rarely settles the matter; the labels that form afterward do.

Why do two indicators disagree about market structure on the same chart?

Because structure is parameter-relative. Different swing strengths, wick-versus-close break rules, and internal-versus-external swing choices produce different label sequences from identical bars. Neither is wrong; they describe structure at different resolutions. Match the settings before comparing tools, and pick the resolution that fits your holding period.

Do I label structure with wicks or closing prices?

Both conventions exist. Wick-based labeling treats every traded extreme as structural, which reacts earlier but counts more noise and stop runs. Close-based labeling waits for bodies to confirm, which lags but filters sweeps. A common hybrid marks swings with wicks and requires closes to declare breaks; whichever you choose, keep it fixed.

Build Swing Structure Grammar your way.

Quant writes, tests, and refines it with you — then it runs on LuxAlgo charting or ports to TradingView.