Definition and example
Lo, Mamaysky and Wang propose algorithmic recognition and conditional historical-return comparisons; reproducibility is the point, not a universal entry rule.[1] With prices 100, 110, 104, 109, 103, two highs within two units, an intermediate low and a final lower low satisfy a five-point teaching rule at observation five. If the next observation confirms a high, 109 is known only after 103; trading earlier uses future information.
Outcomes and controls
Choose a fixed horizon such as five observations. Keep delisted, missing and unavailable cases. Store every search moment, match and outcome so the denominator is visible. Eleven successes among 20 matches is 55%; if comparable non-pattern periods are positive 60% of the time, 55% is not support. Record magnitude, dispersion, costs, holding time, overlapping matches and all tested tolerances.
Support, resistance and agreement
Define touches, tolerance, intraday extremes versus closes, scale and adjusted series; use [chart literacy](/guides/chart-literacy/). Human raters should mark independently without future data and preserve disagreements. Agreement is not predictive accuracy: test reproducibility, then outcome distributions, then economics.
Fixed-time dictionary
Use positive adjusted daily closes P, a 40-observation window and B as the first close. Highs exceed neighbours strictly, lows are strictly below; point i is available after i+1. Set e=0.02B and prior movement at least 0.10B over ten observations. Enumerate every alternating confirmed-extreme sequence; choose the lexicographically smallest tuple for same class and completion time, keep other completion times separate, and treat shared prices as dependent. Missing ten prior observations means insufficient data.
**Head and shoulders:** H₁,L₁,H₂,L₂,H₃; H₂ exceeds shoulders by more than e and |H₁−H₃|≤e; neckline through L₁,L₂; completion is a close below neckline−e within five closes. The inverse swaps highs and lows. **Complex version:** H₁,L₁,H₂,L₂,H₃,L₃,H₄ with central highs within e, above outer highs by e, close outer shoulders and neckline through L₁,L₃. A failure is a return above neckline+e after the breakout. **Triple top/bottom:** three highs and lows with ranges ≤e, completed by the opposite neckline break. **V bottom:** two falling differences then two rising differences, each leg ≥0.10B. **Rounded bottom:** on exactly 21 closes, least-squares P(t)=a+bt+ct², t=0…20, c>0, vertex −b/(2c) in [8;12], residual ≤e and depth ≥0.10B; rounded top mirrors c<0.
Triangles, wedges and rectangles
Use at least three confirmed highs and lows in the last 20 observations. U(t) joins extreme highs and L(t) extreme lows; U>L. Horizontal means |d|≤e. Narrowing reduces U−L by at least e; widening increases it. Symmetric triangle: dU<−e,dL>e; ascending: horizontal top,dL>e; descending: horizontal bottom,dU<−e; broadening: dU>e,dL<−e; rising wedge: dU>e,dL>e; falling wedge: dU<−e,dL<−e; rectangle: horizontal boundaries. The first close beyond U+e or L−e within five observations is completion; continuation or reversal describes the observed side, not a forecast. **Diamond:** two disjoint ten-observation windows, first widening and second narrowing, each with two highs and lows and seam differences ≤e.
Flag, pennant, timing, volume and objective
A flag needs a pole of at least 0.10B over five closes, then a ten-close opposing channel with two highs and lows, |dU−dL|≤e, near-constant width and retracement no more than half the pole. A pennant uses a narrowing symmetric triangle. Completion is a boundary exit within five closes; without a pole it is a channel or triangle.
If U=110−t and L=90+t meet at t*=10, a breakout at t=6 gives (t breakout−t start)/(t*−t start)=0.6. Code no-breakout and out-of-range cases separately. Volume ratio 80/100 is 0.8; exchange volume, turnover and tick activity differ. Add initial triangle width to an upper breakout or subtract from a lower one: width 20 and breakout 106 give 126. Set the horizon and count failures; height gives neither probability nor transferable loss.
Sources and limits
[1] [Foundations of Technical Analysis](https://www.nber.org/papers/w7613). Pattern operationalisation and conditional historical information, not proof of profit. The dictionary, tolerances and examples are an independent educational construction.