The Refined Gentleman's Patterns
INDICATOR PACKAGE: eight structural chart patterns with developing, breakout and completed stages; hourly signals with closed 4h/day context.
The Refined Gentleman's Patterns
INDICATOR PACKAGE · version 0.2.1
Eight structural chart-pattern detectors for hourly candles, with fully closed 4h and daily context. Add this package to a chart to plot event markers, boundaries and rolling VWAP. The companion For the Refined Gentleman Gambler watch runs the same detector in OM and sends stage-labelled bulletins; the watch does not need an open chart.
Developing setup → Breakout / vulnerable → Completed pictured sequence. Each is labelled separately. A developing setup is not a confirmed trap.
Version 0.2.1 removes WSB entirely. The other eight pattern IDs, stage masks and rules are unchanged. Upgrade the companion watch to 0.2.1 too. Existing chart instances remain on their pinned version until upgraded.
Version 0.2.0 introduced structural detection and replaced the 0.1.x scalar contract: signal, pattern_id, stage and the three stage masks replace the old mask output.
Pattern rules
Closed-price swings need a reversal of 1.2 ATR, with a 0.1% price floor. That reversal threshold freezes when the extreme advances. A pivot becomes usable on its confirmation candle, not at its earlier occurrence. Setups require at least six ATRs of height and 12–192 hours of structural history. Every setup freezes its anchors and boundary equations; new candles advance its state or invalidate it.
| Pattern | Required structure and completion |
|---|---|
| Bullshit Wedgie | Upward impulse, three tightening cycles, upside break, then failure through the lower boundary. |
| Bullish Constipation · reversal | Downtrend, higher low and higher high, continuation break, then loss of the higher-low support. |
| Cup My Balls | Large bowl with a distributed floor and recovery to its rim, a smaller shallower two-trough bowl, rim breakout, then failure below the smaller bowl. |
| Bearish Mac and Cheese Wedge | Downward impulse, converging swings, downside break, then reversal above the upper boundary. |
| Bullish Constipation · range | Repeated horizontal touches, upside break, reversal below the range, then reversal above it again. |
| Double Tits | Two similarly high tops, comparable intervening lows, smaller rebound, neckline break, then recovery above both tops. |
| Bullish Pennant | Upward impulse and four tightening cycles, upside break, then failure through the lower boundary. |
| Head and Shit My Pants | Two shoulders below a higher head, neckline break, then at least eight candles within 6% of the formation's height. |
Stages are developing setup, breakout/vulnerable, and completed pictured sequence. Developing does not predict the ending. A breakout can coincide with the candle that first confirms the setup; both stage bits are retained. Metrics never compensate for a missing structural predicate.
The image is a schematic: tolerances and confirmation thresholds are explicit implementation choices, not measured predictive probabilities. The backward-time pennant loop and the options-expiry annotation are not literal candle events. The two similar wedge drawings are distinguished by their touch counts. A completed sequence does not imply a profitable entry.
Unbroken setups expire after 96 hours; broken setups after 72. Wedges must break before their projected apex. A breach in the wrong direction invalidates an unbroken setup. Gaps and invalid candles reset everything.
Each family holds independent state. Stage masks expose all transitions on a candle. The primary row shows the most advanced transition; ties prefer the formation with more anchors. anchor_*, formed_at, broken_at, turn_at, extreme_at and completed_at distinguish observed times from recognition. Event fields are absent on quiet rows. These are timestamped scalar outputs; the standalone viewer renders their geometry. Native chart outputs currently provide event markers, boundary values and VWAP, not the viewer's full swing annotations.
Context
- ATR: simple mean of 14 true ranges; RSI: simple 14-period gains/losses.
- Relative volume: current volume / prior 24-candle mean, USD normalized in the replay.
- VWAP: rolling 24-bar typical-price/volume approximation; displacement in ATRs.
- Compression: 24-bar high-low width / 48-bar width.
- 4h trend: EMA 5 versus EMA 20 on fully closed UTC four-hour buckets.
- Daily trend: EMA 5 versus EMA 10 on fully closed UTC days.
Context agreement awards 25 points each for elevated volume, aligned 4h trend, aligned daily trend and aligned RSI. Missing higher-timeframe context stays missing and earns no points. This is a heuristic count, not a win probability. geometry_pass is a binary structural result, not a similarity/confidence score. Funding and OI are not included.
Every input must be a contiguous, valid hourly candle. The host must supply closed bars for confirmed alerts; live metric reads can include a forming candle.
Validation
132 local checks cover all three stages of eight independent synthetic shapes, missing legs, unequal peaks, broad-V rejection, slow or absent spikes, missing flat endings, scale invariance, frozen anchors, causal replay, data gaps and closed higher-timeframe buckets. The former WSB examples and real BTC history explicitly check that none of its stages can return.
A frozen 28-day BTC/ETH/SOL sample (671 closed hourly candles per market) produces no qualifying events after removing WSB. The remaining families have synthetic coverage but no confirmed real positives in that sample. These checks establish implementation behavior, not measured trading accuracy or profitability.
Use an OM runtime with the scalar-feed ordering fix when running this indicator in watches. The detector requires 576 hourly warmup bars. It uses market candles only and has no order execution permissions.
Indicator
Outputs
| Output | Plot | Panel | Style |
|---|---|---|---|
pattern_id | data only | lower | default |
stage | data only | lower | default |
geometry_pass | data only | lower | color #60a5fa |
evidence_score | data only | lower | default |
span | data only | lower | default |
pattern_start | data only | lower | default |
match_end | data only | lower | default |
upper | line | overlay | color #ef4444 |
lower | line | overlay | color #22c55e |
marker | shape | overlay | color #c084fc, where signal |
signal | data only | lower | default |
atr | data only | lower | default |
relative_volume | data only | lower | default |
rsi | data only | lower | default |
trend_4h | data only | lower | default |
trend_1d | data only | lower | default |
vwap | line | overlay | color #f59e0b |
vwap_atr | data only | lower | default |
compression | data only | lower | default |
forming_mask | data only | lower | default |
breakout_mask | data only | lower | default |
confirmed_mask | data only | lower | default |
context_ready | data only | lower | default |
formed_at | data only | lower | default |
broken_at | data only | lower | default |
turn_at | data only | lower | default |
completed_at | data only | lower | default |
anchor_count | data only | lower | default |
boundary_upper | data only | lower | default |
boundary_lower | data only | lower | default |
upper_slope | data only | lower | default |
lower_slope | data only | lower | default |
anchor_0 | data only | lower | default |
anchor_1 | data only | lower | default |
anchor_2 | data only | lower | default |
anchor_3 | data only | lower | default |
anchor_4 | data only | lower | default |
anchor_5 | data only | lower | default |
anchor_6 | data only | lower | default |
anchor_7 | data only | lower | default |
anchor_8 | data only | lower | default |
anchor_9 | data only | lower | default |
anchor_10 | data only | lower | default |
anchor_11 | data only | lower | default |
anchor_12 | data only | lower | default |
anchor_13 | data only | lower | default |
anchor_14 | data only | lower | default |
anchor_15 | data only | lower | default |
extreme_at | data only | lower | default |
No params.
Inputs
| Input | Source | Selection |
|---|---|---|
close | ohlcv | field close, missing nan |
high | ohlcv | field high, missing nan |
low | ohlcv | field low, missing nan |
volume | ohlcv | field volume, missing nan |
time | time | field bar_open_sec |
Provenance
| ABI | wrun-1 |
|---|
| Version | Published | Note |
|---|---|---|
| 0.2.1 | Sep 24, 2026 | |
| 0.2.0 | Sep 24, 2026 | |
| 0.1.1 | Sep 23, 2026 | |
| 0.1.0 | Sep 22, 2026 |
| File | Size |
|---|---|
| README.md | 5.8 KiB |
| om-package.json | 728 B |
| src/geometry.ts | 12.8 KiB |
| src/indicator.ts | 7.2 KiB |
| wrun/metadata.json | 6.0 KiB |
| wrun/module.wasm | 9.3 KiB |