A three-pivot channel built from a median line and two parallels — deterministic geometry with subjective inputs.
Andrews' Pitchfork — also called the median line method — is a drawing tool attributed to Alan Hall Andrews, who taught it as part of his mid-20th-century 'Action-Reaction' course. From three chosen pivot points it projects a channel: a median line drawn from the first pivot through the midpoint of the second and third, plus two parallel lines passing through the second and third pivots. The geometry is completely deterministic — plain midpoint and slope arithmetic — which means the only judgment call, and the tool's biggest weakness, is which three pivots you pick. Two traders can draw materially different forks on the same chart and both be 'correct' by the tool's rules. The pitchfork describes the slope and width implied by three past swing points; it knows nothing about future price, and there is no verified evidence that markets are obliged to respect median lines. Treat a fork as a structured, reproducible way to draw a trend channel rather than as levels the market must honor. This is educational content only, not financial advice, and trading involves risk of loss.
Label the pivots P1 (the origin, an earlier swing high or low), and P2 and P3 (the next two alternating swings). Compute the midpoint M of the P2–P3 segment: M = ((x2 + x3) / 2, (y2 + y3) / 2), using bar index for x and price for y. The median line is the ray from P1 through M, with slope (My − P1y) / (Mx − P1x) in price per bar. The upper and lower parallels pass through P2 and P3 with exactly the same slope, so the fork is a channel whose width is fixed by the vertical distance between P2 and P3, extended to the right indefinitely. That is the entire construction — midpoint math, one slope, three lines. Variants change only the anchor: the Schiff pitchfork shifts P1 halfway toward P2 in price, and the modified Schiff shifts it halfway in both time and price; the parallel construction is identical. One timing detail matters for anyone coding it: the fork can only be drawn after P3 is a confirmed swing point, which typically means several bars after the actual extreme. An auto-drawing script that anchors to unconfirmed pivots will repaint as those pivots move.
The classical tool has no numeric parameters — the 'settings' are the three pivots themselves. Auto-drawing implementations expose a pivot length (bars required on each side of a swing to confirm it, commonly 5-15) and a variant selector: standard, Schiff, or modified Schiff. Longer pivot lengths give more stable anchors but confirm later; shorter lengths redraw more often. State your pivot rules explicitly if you want two people (or two scripts) to draw the same fork.
//@version=6
indicator("Andrews Pitchfork Example", overlay = true, max_lines_count = 3)
aBack = input.int(60, "Pivot P1 bars back (swing low)", minval = 3)
bBack = input.int(40, "Pivot P2 bars back (swing high)", minval = 2)
cBack = input.int(20, "Pivot P3 bars back (swing low)", minval = 1)
var line medianLn = na
var line upperLn = na
var line lowerLn = na
if barstate.islast and bar_index > aBack
ax = bar_index - aBack
bx = bar_index - bBack
cx = bar_index - cBack
ay = low[aBack]
by = high[bBack]
cy = low[cBack]
midX = (bx + cx) / 2
midY = (by + cy) / 2
line.delete(medianLn)
line.delete(upperLn)
line.delete(lowerLn)
medianLn := line.new(ax, ay, midX, midY, extend = extend.right, color = color.teal, width = 2)
upperLn := line.new(bx, by, bx + (midX - ax), by + (midY - ay), extend = extend.right, color = color.gray)
lowerLn := line.new(cx, cy, cx + (midX - ax), cy + (midY - ay), extend = extend.right, color = color.gray)Pro tip: Write down your pivot-selection rule before drawing — for example, 'confirmed swings with N bars on each side, most recent three alternating swings' — and stick to it. A fork drawn from a fixed rule is at least testable; a fork adjusted until it fits recent price is a story told backwards. Remember that the geometry being exact does not make the levels meaningful. Educational information only, not financial advice; no drawing tool predicts price, and trading involves risk of loss.
Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.