Trading glossary
Trendline
By the PatternX team · Published
Definition
A trendline is a straight line drawn through two or more rising swing lows in an uptrend, or falling swing highs in a downtrend, used to show the trend's slope and to mark a moving level of support or resistance.
How it works
To draw an uptrend line, connect at least two rising swing lows and extend the line to the right; for a downtrend line, connect falling swing highs. Two points define a line, while a third touch is what most traders treat as validation. For points at bars t1 and t2 with prices P1 and P2:
Some analysts fit a least-squares line through several pivots instead of anchoring on two, which makes the line less sensitive to a single extreme. On charts covering large percentage moves, a logarithmic scale changes where the line falls.
Pairs of trendlines outline many patterns: parallel lines form channels and flags, while converging lines form triangles and wedges.
Why it matters
A trendline turns "the trend is up" into a level you can act on. Pullbacks to a rising line offer entries with a nearby stop, and a decisive break of the line is an early warning that the trend is weakening. A break on its own doesn't mean a reversal; trends often slow into sideways ranges instead.
Example
For example, suppose a stock makes swing lows at $30.00 on day 1 and $33.00 on day 11. The slope is $3.00 ÷ 10 = $0.30 per day, so the line projects to $35.70 on day 20. If price dips to $35.90 that day and turns higher, the line has its third touch. A daily close at $34.80, well under the projected $35.70, would count as a break.
Common mistakes
- Redrawing to fit. Adjusting the line after every break makes it meaningless.
- Anchoring on outliers. One spike low can tilt the whole line; a fitted line or candle bodies may be more representative.
- Expecting steep lines to last. Very steep trendlines tend to break sooner, often into a sideways phase.
How PatternX uses it
In PatternX, trendlines are part of the pattern rules. For the falling wedge and rising wedge, PatternX fits least-squares lines through up to the last four swing highs and swing lows (at least two of each), and the breakout is a close beyond the relevant line. The symmetrical triangle needs a falling upper line and a rising lower line, and the head-and-shoulders neckline is a sloped line through two troughs. See pattern detection.