Pivot trendlines
Two lines, one over the highs and one under the lows, each drawn through real swing points. Together they show the lane price has been moving in.
What it shows
Pivot trendlines draw both boundaries at once. The upper line is fitted through swing highs. The lower line is fitted through swing lows. The two lines do not need to be parallel.
Every point the lines pass through is a real turning point in the data. Nothing is drawn by feel. When the lines tilt toward each other you get a triangle or wedge. When they run side by side you get a channel.
How we find it
The same code that draws it on your chart follows these steps, with the same result every time.
- Find swing highs and swing lows.
- Fit a line through the best pair of swing highs and another through the best pair of swing lows, testing every pair.
- Score each pair by touches, how long the line held, and how few closes broke it.
- Show the highest scoring upper line and lower line together.
Starting values: Swing size 3 bars each side (daily), 2 (weekly); Tolerance 1.0% of price; Minimum touches per line 2; Minimum length 20 bars. These are proposed and will be tuned on real price data before launch.
How to read it
- Red is the upper boundary, teal is the lower boundary.
- Each dot is a touch where price turned at the line.
- If the lines point the same way price is in a lane. If they point toward each other the lane is narrowing.
Status labels you may see
| Label | What it means |
|---|---|
| Inside the lines | The last close is between the two lines. |
| Near the upper line | Within 2% of the red line. |
| Near the lower line | Within 2% of the teal line. |
| Outside | The last close is beyond a line. |
What cancels it
A close beyond either line. The line that was crossed is dropped and the next best fit is shown.
What traders check next
- Whether the touches are spread out or bunched at one end.
- Whether the two lines are parallel, converging or spreading apart.
- Whether a different period shows the same lane.
Limits
- Different pairs of swing points can both look reasonable.
- The score favors lines with many touches, which can hide a better recent fit.
- Lines are only as good as the swing size chosen.
Try it in forecastviz
- Open any ticker and choose Trendlines and channels → Pivot trendlines in the left menu.
- Switch between 6M, 1Y, 3Y to see how the picture changes.
- Compare with Uptrend line and Downtrend line on the same chart.
Questions
Why two lines?
One line shows one boundary. Two lines show the range price is working inside, and how wide it is.
Are these lines drawn by AI?
No. They are computed from price data with fixed rules, so the same data gives the same lines every time.
Related trends
Further reading
- Murphy, Technical Analysis of the Financial Markets
- Edwards and Magee, Technical Analysis of Stock Trends
Educational only. Not financial advice, and not a price forecast. Charts are drawn by code from past price data, which may be delayed.