# Pattern translation — lesson

Gym heading: Situational awareness. Written before the code (Sep 8 2026), from `docs/pattern-translation-layer.md` (draft 1, Sep 8); the rule's measurements revised the same day, during the build, once the first harness runs showed what the first wording found in the bars: the loud part became a percentile, the expansion window a half, a touch became a rejection or a push that never got acceptance, the coil's edge had to bound the coil, and the trigger's scan starts at the level's first touch (each is in its bullet below). The teach screen shows this text; the answer key implements the rule in it and nothing else. Harness, confidence, persistence and reveal format follow stop-vs-noise. The charts are this module's own generator: a parameter set per pattern (a polyline of swings and the legs between them, the touches and the pushes authored, the finished bars measured), not a library of drawings. Three rep types in one session, the first module in the gym to mix them. Distances are in M everywhere.

Choices made where the draft was silent:

- Both mechanisms are measured over a window: the last N bars, N drawn per rep from 21 to 30 (config), the divider drawn on the chart; the window carries at most 8 bars of walk before its pattern starts (config), so a long window means a slower pattern, not a longer run-in. The rolling envelope of a bar is the height, highest high to lowest low, of that bar together with the three before it. Compression: the envelope averaged over the last third of the window is at most half (config 0.5) of the 80th percentile (config) of the envelopes over the bars before the last third. Expansion, the megaphone: the envelope averaged over the first half of the window is at most half of its average over the last third; it reads NEITHER and is decided first, so nothing in an expanding range is a setup. (Revised from "the average of the larger half" and "the first third": a displacement bar is only a few envelopes wide, and a quiet run-in before a short pattern read as expansion.)
- A level is found, not told, on translate reps: swing highs in the window (a bar's high above the bar on either side), clustered from the highest down, a cluster being the swing highs within 0.15 M of its highest member; the level's price is the cluster's mean. A visit is a run of consecutive bars that are not entirely on the near side of the zone 0.15 M either side of the level; it ends when a bar's whole range is back on the near side, and an unfinished visit at the right edge counts only if the last close is back there. A visit is a touch of two kinds: a rejection when nothing in it traded past the push margin, a failed push when something did and the push never got acceptance (two closes in a row beyond the level by more than the margin) or came back by a gap of more than 0.5 M (config). A push that got acceptance is not a touch of that level: the level broke, whatever happened later. Floors mirror it with swing lows. (Revised from "a bar that goes through the zone is a visit": a leg slicing through a minor swing counted as touches of it, and a range's every swing read as a failed break of the swing before.)
- A failed break needs a level with two or more touches, at least one a rejection before the push, a bar that traded through it by more than 0.30 M (a wick is enough: someone traded there), and the last close back on the original side. Among several, the level with the most touches, then the deeper push. A push that is still holding at the right edge is not a failed break; it is acceptance in progress, another module's read, and such charts are not built here.
- BOTH is compression and a failed break at the coil's flat edge: a coil that broke the wrong way and came back. Built as an ascending triangle or a cup and handle whose last push through the flat edge was a wick that closed back inside. Wedges are compression only: the draft calls a rising wedge a failed break in slow motion, the reveal says so, but no level fails in it and the rule does not pretend one did.
- The level that matters: for a failed break, the level that failed (the trapped side is beyond it); for compression, the coil's flat edge: the level with the most rejections, two at least, that nothing in the last two thirds of the window traded past; none when no such level exists (symmetrical triangles, pennants, flags, wedges) and none for NEITHER. A click within 0.5 M of it (config) is pointing at it. (Revised: without the edge condition, two wiggles of the run-in read as the level.)
- The trigger is a close beyond the level by more than 0.10 M, in the direction away from the pattern: through the flat edge of a coil; for a failed break, the unwind's confirmation, a close through the neckline, the most recent swing on the far side of the pattern between the level's first and last touch (the crowd's word, kept because it is the level they watch). Only closes after the level's first touch count. Translate and un-translate charts freeze before it: no rep of those two kinds has the trigger printed, and the reveal says so every time.
- Trigger reps draw the level. The last bar may still be forming, drawn hollow and marked. Closes count from the level's first touch: the first bar in the window that reaches its zone and closes on the near side. YES when a completed bar after it has closed beyond the level by more than the margin; CAN'T TELL when none has and the forming bar is currently beyond it by more than the margin, so it can still close back inside; NO otherwise, a forming bar sitting inside included. A wick through on a completed bar is nothing. The bars after the setup, the run at the level and the decision, are 3 to 6 whatever the answer. Only patterns with a level come up: ascending and descending triangles (the flat edge), cup and handle and its inverse (the rim), head and shoulders, double and triple tops and bottoms (the neckline; the troughs between the tops are authored within the touch zone of each other, so the neckline is a level too).
- Patterns in the drill: ascending and descending triangles, symmetrical triangle and pennant (the pennant has a pole), bull and bear flags, rising and falling wedges, cup and handle and its inverse, double and triple tops and bottoms, head and shoulders and its inverse, island reversals, the broadening formation, and charts with nothing in them. Rectangles and rounding tops are in the table and not in the drill: the range is its own module already, and the rounding read is a volume taper this module does not draw (bars only; the flag's thin-versus-thick drift is the same volume read, stated in the table and not tested). Half the reps are mirrored, which is where the mirror names come from.
- Un-translate shows four charts: the named pattern and three others, its mirror when it has one, a cousin with the same mechanism, and one with a different mechanism or nothing in it; positions shuffled. A pennant is never the distractor for a symmetrical triangle, nor the reverse. No M readout on this kind: recognition, no distances.
- Shares (config): translate 0.40, un-translate 0.30, trigger 0.30 of the 20 reps. Translate mechanisms: compression 0.35, failed break 0.30, both 0.10, neither 0.25, two in five of the neithers a broadening formation. Trigger answers a third each; three in five of the YES and NO reps carry a forming last bar, so the hollow bar alone does not say CAN'T TELL. Some trigger closes sit a hair from the margin on purpose (config share); the reveal shows the number either way.
- The window length, the opening's length, the bar count and the mirror are drawn whatever the case, and so is M in points: a coil shrinks the last 20 bars by construction, so M is drawn per rep from one range for every case and the price scale is solved from it (the scale is not on the screen; M is). The harness checks all of them at 3.5 standard errors. On un-translate the target's position and its window carry nothing. (Revised: with the scale drawn first, M in points ran 2 on compression reps and 5 on neithers.)
- Soft clock: 10 seconds for translate and un-translate, 8 for trigger.

Persistent header: **"Training your eye for the mechanism under the costume."**

## Before you name it

- **The names** — Head and shoulders, rising wedge, bull flag, cup and handle. Books are written on them, courses are sold on them, and a slice of the crowd reacts to them in real time, which makes them worth knowing and worth nothing more. A pattern name describes the geometry. It is not a forecast. Almost every one of them is one of two things this gym already drills, wearing a costume.
- **Compression before expansion** — The range contracts: bars get smaller, highs and lows converge, the market is agreeing on a price. Agreement does not last, and when it breaks the move is usually fast, because the thin area has nothing in it to slow price down. It predicts that a move is coming. Not which way. In numbers: over the window (the last N bars, N between 21 and 30; the divider marks it), the rolling envelope, each bar with the three before it, high to low, averaged over the last third is at most 0.5 of the 80th percentile of the envelopes before it.
- **Failed break** — Price pushes through a level, cannot get acceptance on the other side, and comes back. The people who traded the break are now offside. Their exit is your fuel. In numbers: a level with two or more touches, a bar that traded through it by more than 0.30 M, and the last close back on the original side. A push that closed beyond the level twice in a row got acceptance and is not this: the level broke.
- **Both** — A coil that broke through its flat edge and came back: compression and a failed break stacked. The trapped crowd is beyond the edge.
- **Neither** — No coil and no failed level. Anti-compression counts here too: the range expanding, no agreement on value (the first half's envelope at most 0.5 of the last third's). The read there is stay out.
- **The level that matters** — For a failed break, the level that failed. For compression, the flat edge of the coil: the level with the most touches, two at least. A coil with no flat edge, a symmetrical triangle, a pennant, a flag, a wedge, has no level yet. Neither has none. A click within 0.5 M of the level is pointing at it.
- **The trigger** — A close through the level by more than 0.10 M, away from the pattern. The shape is the setup; the close through the level is the trigger. Entering on the shape is the trade taken at 29,627 under a ceiling that had already rejected three times. For a failed break, the unwind confirms on a close through the neckline, the last swing on the far side of the pattern before the level's last touch. A wick through is not a break. A bar still forming has not closed.
- **The translation table** —

| The name | What it actually is | The read it is asking for |
|---|---|---|
| Ascending triangle | Compression against a flat ceiling with rising lows | Compression. The level is the ceiling; count its touches, three or four rejections make it live. The close through it is the trigger, not the shape. |
| Descending triangle | The same upside down: compression against a flat floor | Mirror of the above. |
| Symmetrical triangle, pennant | Pure compression, no bias to either edge; a pennant is the same coil after a pole | Compression, no level. The range in M is shrinking, nothing else. Direction is unknown until the break, and the direction before the coil is not a reliable tell. |
| Bull flag, bear flag | A displacement bar, then compression that drifts against it | Compression, no level. Whether the drift is thin (rest) or thick (someone selling into it) is a volume read this module does not draw. |
| Rising wedge | Compression where the highs rise slower than the lows: momentum failing on the way up | Compression, no level. A failed-break setup in slow motion, each new high with less follow-through: buyers running out of room, not a bearish prediction. |
| Falling wedge | Mirror of the rising wedge | Sellers running out of room. |
| Double top, double bottom | A failed break of the first high or low: the second test pushed through and could not hold | Failed break. Touch count two, not much: the first test made it a level, the second confirmed it. Wait for the third, or the close through the neckline. |
| Triple top, triple bottom | The 15m three-touch setup by its textbook name | Failed break at a level with three touches. This is the one you already trade; the fourth touch is the decision. |
| Head and shoulders | A failed break (the head fails to hold above the left shoulder's level) followed by a lower high (the right shoulder) | Failed break: a lower high after a failed high, the structure call you already make. The neckline is the higher low that has to break for the read to be confirmed. |
| Inverse head and shoulders | Failed break of a low, then a higher low | Mirror. |
| Cup and handle | A round bottom (a slow recovery from a flush) into a small compression right under the prior high | Compression at a ceiling, the rim: an ascending triangle with a longer runway behind it. |
| Rectangle, range, box | Compression with the edges already visible | A range: fade the edges, do not trade the middle, ask whose range it is. Its own module; not in this drill. |
| Rounding top, rounding bottom | A very slow failed break, momentum bleeding out over a long window | Read the volume taper: a low-volume node forming at the extreme. Not in this drill. |
| Broadening formation, megaphone | Anti-compression: expansion with no agreement on value | Neither. Disorder: efficiency low, ranges expanding. The read is stay out, not which edge. |
| Island reversal | Gap, trade, gap back: a failed break where the crowd was trapped by a gap instead of a wick | Failed break, bigger fuel: the trapped positions have no orderly exit. |

- **What the labels are good for** — Two things, and only two. Knowing what the crowd is looking at: a textbook pattern on the daily or the 4h means a lot of people are watching the same shelf, a sticky area to plan for or to avoid. And talking to old-school traders: "there's a head and shoulders forming on the hourly" is a failed high, a lower high, and the higher low they call the neckline; then you check the touch count and the room and decide for yourself whether it is anything.
- **What it doesn't say** — Nothing here predicts direction. The trade decision still comes from the reads: the touch count (Fresh or burned), whether the close came back (Acceptance, Trapped or not trapped), the room (Runway), the size of the noise (Stop vs noise). This module only tells you which read a shape is asking for.
- **M** — The median high-to-low range of the last 20 bars. Every distance here is in M: the touch zone, the push, the margin, the click. The number for the current chart is on the screen.
- **Confidence is a number** — Low means 40%, Medium 65%, High 90% that your call is right. Scored Brier-style: sure and wrong costs 0.81, unsure and wrong costs 0.16, sure and right costs 0.01. Being certain is as expensive as being wrong.

## The read

Mechanism first, name second. Is the range contracting? Did a level with two touches get pushed through and come back? Where is the flat edge, or the level that failed? Has a close through it printed, or only a wick, or a bar that has not closed?

## The reps

Three kinds, mixed through the session; the kind is stated on the rep.

- **Translate** — A chart, the window marked off, nothing else drawn. M is stated. The question, in full: **"Which mechanism is this, and where is the level that matters?"** Compression, Failed break, Both, or Neither; click the level on the chart, or say there is none; with a confidence. Scored on the mechanism and the level together. The pattern name is revealed after, not before: see the mechanism first, learn the name second.
- **Un-translate** — A name and four charts. The question: **"Which of these is a {name}?"** Click the chart. Recognition in the other direction, so the vocabulary sticks.
- **Trigger** — A pattern mid-formation with its level drawn, frozen at the right edge; the last bar may still be forming. M is stated. The question: **"Is the trigger in yet?"** Yes (a close through the level has printed), No (still the setup), or Can't tell (the bar is still forming and sits through the level). This is the rep that fixes the trade taken on the setup.

## The reveal

The chart again with the level drawn and the window's last third shaded; the Correct / Incorrect banner; the mechanism, the level and the pattern name, then the trigger's status and one takeaway line; the arithmetic in M (the envelope ratio, the level's touches and the push, the margin); one feedback line keyed to the miss. Every reveal states which of the two mechanisms it was, which level mattered, and whether the trigger had printed. Templates:

- Compression with a level: **"Compression against {the ceiling} at {level}. The crowd calls it {a name}. The trigger is a close through it, and it has not printed. Wait for the close, not the shape."**
- Compression without a level: **"Compression, no flat edge: a move is coming, not which way. The crowd calls it {a name}. Nothing to trigger until a boundary breaks; no trade here."**
- Failed break: **"Failed break at {level}: the crowd that traded the push {above} it is offside, and their exit is the fuel. The crowd calls it {a name}. The unwind confirms on a close through the neckline at {neckline}; not yet."**
- Both: **"Compression into {level} and a failed break through it: the coil broke the wrong way and came back. The crowd calls it {a name} with a failed breakout. The trapped side is {above} {level}; the unwind confirms on a close through {neckline}; not yet."**
- Neither, expanding: **"Anti-compression: the range is expanding and nobody agrees on value. The crowd calls it a megaphone. Stay out."**
- Neither, nothing: **"Nothing here: no coil, no failed level. The crowd will find a name for it anyway. No trade."**
- Un-translate: **"{Name}: {mechanism}. {The read it asks for.}"** with each of the four charts named.
- Trigger, YES: **"Bar {n} closed {above} the level by {d} M. The trigger printed there; anything before it was the setup."**
- Trigger, NO: **"No close through. The nearest close sat {d} M {below} the level. Still the setup: the close through the level is the trigger."**
- Trigger, CAN'T TELL: **"The bar is still forming, {d} M through the level, and it can close back inside. Wait for the close."**

Every rep ends on one of these lines. Each is a decision: wait for the close, fade the trapped side on confirmation, stay out, or stop pretending the name is a trade.

## Answer key

Window: the last N bars of the chart, N per rep. `E[i] = max(high[i−3..i]) − min(low[i−3..i])`. `T = floor(N / 3)`. `tight` = mean of E over the last T bars of the window; `wide` = the 80th percentile of the E values over the window's bars before the last T; `first` = mean of E over the window's first `floor(N / 2)` bars.

- **COMPRESSION** = `tight ≤ 0.5 × wide`. **EXPANSION** = `first ≤ 0.5 × tight`.
- Levels: swing highs in the window (high above both neighbours), clustered from the highest down, members within 0.15 M of the cluster's highest; price = the cluster's mean. A visit = a maximal run of consecutive bars with `high ≥ price − 0.15 M`; it is finished when the next bar has `high < price − 0.15 M`, or, at the right edge, when the last close is below price. In a finished visit: pushed = some bar's `high > price + 0.30 M`; accepted = two consecutive closes `> price + 0.10 M`; gapped back = the bar after it opens more than 0.5 M below the previous close. A finished visit is a **rejection** when not pushed, a **failed push** when pushed and (not accepted or gapped back), and nothing when pushed and accepted. Touches = rejections + failed pushes. Held = the last close < price. Floors mirror it.
- **FAILED BREAK** = some level with `touches ≥ 2`, a failed push after at least one rejection, and held; among several, the most touches, then the deeper push.
- Mechanism: NEITHER when expansion; else BOTH when compression and a failed break; else COMPRESSION; else FAILED BREAK; else NEITHER (nothing).
- The level: the failed level for FAILED BREAK and BOTH; for COMPRESSION the level with the most rejections, `≥ 2`, whose price is at or beyond every high (low) of the window's last two thirds within 0.15 M, else none; none for NEITHER. The neckline: the most recent swing on the far side of the level between its first and last touch, else the far extreme between them. Translate and un-translate reps are built with no close through the flat edge (compression) or the neckline (failed break, after the last touch) by more than 0.10 M, and rebuilt otherwise.
- Translate: correct when the mechanism matches and the level does: both none, or the click within 0.5 M of it.
- Un-translate: correct when the chart clicked is the one built as the named pattern; every chart served has had its mechanism and its level verified by the rule above against the pattern it was built as.
- Trigger: completed bars are every bar but a forming last one; `from` = the first bar in the window whose range reaches `[level − 0.15 M, level + 0.15 M]` with its close not beyond the level by more than 0.10 M. YES = a completed close at or after `from` beyond the drawn level by more than 0.10 M in the break direction. CAN'T TELL = no such close, the last bar forming, and its current price beyond the level by more than 0.10 M. NO otherwise.

Shares as in the choices above. Nothing but the bars carries the case: not the window's length, the opening's length, M, the price scale, the bar count, or the mirror.
