Tool
Chart Pattern Interpretor
interpretor.chart_pattern
Inputs
The chart-pattern bundle from a market.chart_patterns node — carries each detected pattern's name, family, direction, confidence, lifecycle stage, neckline and target.
Outputs
An interpreted pattern bundle: a `matched` gate that is true when a pattern you care about is present and tradeable, plus scalars like confidence, direction, neckline and target_price you can tap downstream.
Chart Pattern reads a chart-pattern detector's output (head-and-shoulders, triangles, double-tops, and more) and turns it into a usable gate plus handy values like confidence, direction, neckline and a projected target. Use it to act only on the chart patterns that fit your plan.
How it works
Wire the `info` handle from a market.chart_patterns node, pick a mode (by name, by family or preset, by direction, or by minimum confidence), and optionally require the pattern to be at a tradeable lifecycle stage. It exposes a `matched` gate plus scalars like `target_price` you can use as a take-profit.
Modes
Mode options
Match only the exact pattern slugs you list in `codes` (an allow- or block-list).
When to use: When your plan trades specific named shapes, e.g. only a head-and-shoulders or a double-top.
Match any pattern belonging to a family or preset you pick in `selected` (e.g. bullish_reversal, triangle).
When to use: When you care about the kind of setup, not the exact name — admit a whole bucket at once.
Match patterns that imply a chosen side — up, down, undecided, or any.
When to use: When you only want bullish (or only bearish) patterns, whatever their name.
Match only patterns whose detector confidence meets `confidence_threshold`.
When to use: When you want to admit any shape but cull weak, low-confidence detections.
Code match mode options
Only the listed `codes` count as a match; everything else is ignored.
When to use: The usual choice — name exactly the few patterns you trade.
Every pattern matches EXCEPT the ones you list in `codes`.
When to use: When it's easier to name the handful of shapes you want to skip.
Selected options
Patterns that flip a downtrend up (e.g. inverse H&S, double-bottom, rounding bottom).
When to use: Long entries timed to a trend turning from down to up.
Patterns that flip an uptrend down (e.g. H&S, double-top, rounding top).
When to use: Short entries timed to a trend turning from up to down.
Patterns that pause an uptrend then resume higher (e.g. bull flag, ascending triangle).
When to use: Add to or join an existing uptrend on the resumption breakout.
Patterns that pause a downtrend then resume lower (e.g. bear flag, descending triangle).
When to use: Add to or join an existing downtrend on the resumption breakdown.
Two roughly equal peaks (double-top) or two equal troughs (double-bottom) at the same level.
When to use: Reversal entries when price fails twice at the same price.
Three roughly equal peaks or troughs at one level — a stronger version of the double.
When to use: Reversal entries after price is rejected three times at the same price.
Three peaks with the middle (head) highest and two lower shoulders, sharing a neckline.
When to use: Classic reversal — short the break of the neckline after the right shoulder.
Highs and lows converge to a point as the range tightens before a breakout.
When to use: Trade the breakout when a coiling triangle resolves up or down.
Price runs between two parallel sloping trendlines (an up- or down-channel).
When to use: Fade the rails inside the channel, or trade the eventual breakout.
A horizontal range between flat support and flat resistance before a breakout.
When to use: Range-trade the box edges, or trade the break of support / resistance.
A sharp pole, then a small rectangle drifting against the trend, then a resume in the pole's direction.
When to use: Continuation entries — join the trend when the flag breaks.
A sharp pole, then a tiny symmetrical triangle that coils, then a continuation move.
When to use: Continuation entries — like a flag but the consolidation converges.
Both trendlines slope the same direction and converge (rising or falling wedge); often reverses.
When to use: Reversal entries — a rising wedge breaks down, a falling wedge breaks up.
A megaphone of widening swings — higher highs and lower lows as volatility expands.
When to use: Volatile reversal / fade setups at the expanding extremes.
A slow, smooth saucer (rounding bottom) or dome (rounding top) curving the trend around.
When to use: Gradual reversal entries as a curved base or top completes.
A rounded cup base, then a small pullback handle, then a breakout to new highs.
When to use: Bullish continuation / breakout entries when the handle breaks.
Swings first widen (broadening) then narrow (triangle), forming a diamond outline.
When to use: Reversal entries when the diamond resolves out of its narrowing side.
A sharp, fast reversal with no rounding — a hard V bottom or inverted-V top.
When to use: Capturing violent climactic reversals (often after capitulation).
A gentle trend line (lead-in), then a steep over-extended bump, then a break back through the line.
When to use: Reversal entries when an over-extended bump fails and breaks the lead-in trendline.
An impulse leg, a partial retrace, then a second leg of similar size (an ABCD move).
When to use: Targeting — project the second leg's size to set a take-profit.
Direction options
Admit only patterns that point higher (bullish bias).
When to use: Long-only setups — take the bullish reversals and continuations.
Admit only patterns that point lower (bearish bias).
When to use: Short-only setups — take the bearish reversals and continuations.
Admit only patterns with no clear directional lean yet (still forming a bias).
When to use: When you want to watch ambiguous shapes before they resolve.
Admit patterns of either direction (no directional filter).
When to use: Symmetric strategies that trade both bullish and bearish shapes.
Require lifecycle options
Disable the lifecycle check — even patterns still forming count as a match.
When to use: Early monitoring, or when a downstream stage handles confirmation itself.
Admit only patterns whose shape has fully formed (the last pivot is in).
When to use: When you want a finished structure but don't need a confirmed breakout yet.
Admit only confirmed or retested patterns — the default, broken-out and ready to trade.
When to use: The safe default for live entries: only act on a confirmed breakout.
Admit only patterns that broke out AND came back to retest the level before continuing.
When to use: Highest-conviction entries — wait for price to retest the neckline / break level.
Configuration
Picks which test to run: by pattern name, by family/preset, by direction, or by minimum confidence.
In name_filter mode, the list of pattern slugs to match; empty means any pattern counts.
Whether the codes list is an allow-list (include) or a block-list (exclude).
In family_filter mode, the families or presets (like bullish_reversal or triangle) to match; empty means any.
In direction_filter mode, which side to admit — up, down, undecided, or any.
The minimum pattern confidence required to count as a match.
Only admit patterns at or past this stage; tradeable (default) means confirmed or retested, any disables the check.
Off fires only on the pattern's completion bar; on keeps firing on later bars using the last pattern's saved values.
Connects to
Examples
- Filter: only take entries when `matched` is true for a confirmed bullish reversal preset.
- Tap `target_price` into an ORDER_EXIT take-profit slot so the trade aims at the pattern's measured target.
Common mistakes
- Leaving `require_lifecycle` on tradeable but expecting matches on patterns that are only forming — only confirmed/retested patterns pass.
- Setting `confidence_threshold` too low, which lets weak, unreliable patterns through.