Flags and pennants are short consolidation patterns that some traders identify after a sharp price move. This guide explains how they are commonly described and interpreted, and why none of it is predictive. Educational only — nothing here is buy/sell advice or a signal to act on, and trading carries a real risk of loss.
Both patterns start the same way: with a sharp, steep price move that some traders call the flagpole. After that burst, price pauses and trades sideways or drifts in a tight range for a short stretch before continuing or reversing.
The two patterns differ mainly in the shape of that pause:
Both are short-duration patterns — typically a handful of bars up to a few weeks on higher timeframes, not multi-month structures. If the consolidation runs long or grows large relative to the flagpole, many traders stop calling it a flag or pennant at all and treat it as a different formation. The label is descriptive shorthand, not a rule the market follows.
Identification is usually a checklist of shape, not a single trigger. Traders commonly look for:
A practical caution: drawing trendlines is subjective. Two traders can outline the same price action differently, and a shape that looks textbook in hindsight is far harder to call in real time. Pattern recognition is interpretation, not measurement.
Flags and pennants are traditionally grouped as continuation patterns — the idea being that the pause represents a brief consolidation before the prior move continues. That reputation is exactly that: a reputation. It describes how many traders read the shape, not what price is obligated to do.
In practice, traders often talk about these patterns in terms of:
None of these interpretations is predictive. They are frameworks traders use to organise their thinking, and each one can fail. None of this is a recommendation to act.
There's no reliable, fully automatic way to detect flags and pennants — the shapes are too subjective. What you can do is mark candidates for your own visual review. The snippet below highlights bars where a sharp move (a possible flagpole) was followed by a tighter range (a possible consolidation), so you can eyeball them yourself. It draws nothing as a signal — it's a study aid.
//@version=6
indicator("Flagpole + Tight-Range Marker (study aid)", overlay = true)
// Inputs
impulseLen = input.int(5, "Flagpole lookback (bars)")
impulseMult = input.float(2.0, "Flagpole size vs ATR")
rangeLen = input.int(5, "Consolidation lookback (bars)")
rangeMult = input.float(1.0, "Max consolidation range vs ATR")
atr = ta.atr(14)
// A 'flagpole': net move over impulseLen bars is large vs ATR
impulseMove = math.abs(close - close[impulseLen])
bigMove = impulseMove > atr * impulseMult
// A 'tight range' right after: recent high-low span is small vs ATR
rangeSpan = ta.highest(high, rangeLen) - ta.lowest(low, rangeLen)
tightRange = rangeSpan < atr * rangeMult
// Candidate = big move recently, tight range now
candidate = bigMove[rangeLen] and tightRange
plotshape(candidate, title = "Candidate", style = shape.triangleup,
location = location.belowbar, color = color.new(color.gray, 0),
size = size.tiny)This is intentionally crude. It does not confirm a pattern, predict direction, or tell you to do anything — it only highlights bars worth looking at by hand. Tune the inputs to your market and timeframe, and remember that a marker is a starting point for your own judgement, not a result and not a signal to act on.
A few things worth keeping front of mind:
Nothing in this article is predictive, and nothing here is buy, sell, or trading advice. Chart patterns are a way to describe and organise price behaviour — not signals to act on. Trading carries a real risk of loss, and the past behaviour of any pattern is no indication of future results. Do your own research and manage risk on the assumption that any setup can fail.
Educational only — not financial advice. Trading involves substantial risk of loss.