ParallelHeuristic1 min read
◆ The PatternTwo parallel trendlines containing price
A Channel consists of two parallel trendlines between which price oscillates. Ascending channels slope up (bullish), descending channels slope down (bearish), and horizontal channels are ranges. Price bouncing off both lines confirms the channel.
Trade the channel interior · Breakout signals new move
Draw the primary trendline first (connecting 3+ points), then create a parallel line through the opposite extreme.
// Channel types — ascending, descending, horizontal
Key insight: Channels provide both direction and range — buy the lower line, sell the upper line, and exit when price breaks through either boundary.
Pattern bridge: Parallel trendlines bounding price is a visual confidence interval — price stays within 2σ most of the time. In ML, batch normalization keeps activations channeled.
Worked example
The lower line runs through the swing lows at 0.5 a day, and the swing highs sit 5 above it on average. On day 24 the channel runs from 110 to 115.
The example data
The turning points the daily closes run through, in straight lines between them; high and low are half a point either side of each bar.
| Day | Close |
|---|---|
| 0 | 103 |
| 4 | 100 |
| 8 | 107 |
| 12 | 104 |
| 16 | 111 |
| 20 | 108 |
| 24 | 115 |
Where it misleads
- Fading the edges works until the breakout; a channel trade needs a stop outside the channel.
- Parallel lines are an assumption; real highs and lows rarely line up that neatly.
- The width is estimated from a few swings and moves as each new one is added.
In code
def swings(s, n=3): # a swing high (low) is the extreme of the 2n+1 bars around it
w = s.rolling(2 * n + 1, center=True)
return s[s == w.max()], s[s == w.min()]
c = df['close']
highs, lows = swings(c)
slope, base = np.polyfit(lows.index, lows.values, 1) # the lower line through the lows
lower = lambda x: base + slope * x
width = (highs - lower(highs.index)).mean() # the parallel line through the highs
upper = lambda x: lower(x) + width
x = len(c) - 1Assumes import numpy as np, import pandas as pd, and a DataFrame df with columns open, high, low and close for the data above.
Sources
- Technical Analysis of Stock Trends, R. D. Edwards & J. Magee, 1948 (later editions revised by W. H. C. Bassetti)
- Technical Analysis of the Financial Markets, J. J. Murphy, New York Institute of Finance, 1999
Last reviewed October 2026 · How this site checks its content · Report a mistake
Linked from 1