Skip to content
StatePath
Tool Atlascondition.zigzag_pattern

Tool

Pattern Interpretor

condition.zigzag_pattern

ConditionPattern

Inputs

infoBundle (untagged)

The pattern bundle from a market.zigzag_patterns node — the detected swing pivots plus their classification fields (direction, swing profile, envelope, net drift, peak position, code).

Outputs

Boolean

A boolean that is true on each bar the pattern matches the chosen filter, for use as a signal trigger or filter gate.

Pattern Interpretor filters zigzag patterns so you only act on the shapes you want. Wire it to a Zigzag Patterns node and it tests each detected pattern by direction, swing profile, channel envelope, net drift, peak position, retracement depth, or an explicit list of pattern codes.

Pattern Interpretor overview diagramHHHLHH

How it works

Wire the `pattern` handle from a market.zigzag_patterns node, then pick a mode; each mode reveals its own options and reads a different classification field of the pattern. The output is a per-bar true/false gate for a filter or signal.

Modes

Mode options

Direction filterdirection_filter

Tests whether the chosen leg of the pattern points up or down.

Direction filter diagram

When to use: Keep only swings whose direction matches your trade bias (long vs short).

Swing profile filterswing_profile_filter

Admits patterns by how the swing sizes evolve — single, expanding, contracting, stable, or mixed.

Swing profile filter diagram

When to use: Match the pattern's rhythm to your edge, e.g. only expanding (impulsive) swings.

Envelope filterenvelope_filter

Admits patterns by the high/low channel label of their pivots, e.g. HH_HL for a rising channel.

Envelope filter diagramHHHLHH

When to use: Keep only the channel shape you trade — a rising channel for longs, falling for shorts.

Net drift filternet_drift_filter

Tests whether the pattern drifts up or down overall from its first pivot to its last.

Net drift filter diagram

When to use: Filter on net direction even when the internal swings zig-zag both ways.

Peak position filterpeak_position_filter

Tests where the highest pivot sits inside the pattern — first, interior, or last.

Peak position filter diagram

When to use: Pick patterns whose climax lands where your setup expects it (e.g. a final-leg high).

Code filtercode_filter

Matches the pattern against an explicit allow-list or block-list of pattern codes.

Code filter diagram

When to use: Trade only named shapes you have catalogued, and exclude the ones you avoid.

Retracement filterretracement_filter

Admits patterns whose last leg pulls back into a chosen percent range (default 38.2-78.6).

Retracement filter diagram38.2%78.6%

When to use: Keep only pullbacks inside the classic Fibonacci entry zone.

Submode options

First legfirst_leg

Direction is read from the pattern's first leg (its opening swing).

First leg diagram

When to use: Filter on how the pattern started.

Last leglast_leg

Direction is read from the pattern's last leg (its most recent swing).

Last leg diagram

When to use: Filter on the freshest move, the one you would trade into.

Direction options

Upup

Pass only when the tested leg points up (a rising swing).

Up diagram

When to use: Long-only swing entries.

Downdown

Pass only when the tested leg points down (a falling swing).

Down diagram

When to use: Short-only swing entries.

Anyany

Pass regardless of leg direction — a direction pass-through.

Any diagram

When to use: Symmetric setups that trade both sides.

Swing profiles options

Singlesingle

A one-leg pattern — just a single swing, no further pivots.

Single diagram

When to use: Catch the simplest impulse or pullback.

Expandingexpanding

Each successive swing is larger than the one before (broadening shape).

Expanding diagram

When to use: Trade momentum that is accelerating into a climax.

Contractingcontracting

Each successive swing is smaller than the last (coiling / triangle shape).

Contracting diagram

When to use: Anticipate a breakout as range tightens.

Stablestable

Swings stay roughly the same size from leg to leg (an even channel).

Stable diagram

When to use: Trade orderly, rhythmic structure.

Mixedmixed

Swing sizes grow and shrink with no single trend — an irregular shape.

Mixed diagram

When to use: Admit messy structure your other filters will narrow down.

Envelopes options

Higher highs & higher lowsHH_HL

Highs and lows both step up — a clean rising channel.

Higher highs & higher lows diagramHHHLHH

When to use: Trade bullish trend continuation.

Higher highs & lower lowsHH_LL

Highs rise while lows fall — a broadening (megaphone) channel.

Higher highs & lower lows diagramHHLLHH

When to use: Trade expanding volatility / breakouts.

Higher highs, mixed lowsHH_mixed

Highs step up but the lows have no clear order.

Higher highs, mixed lows diagramHH

When to use: Bullish-leaning structure with choppy support.

Higher highs, no lowsHH_na

Only the highs are defined (too few pivots for a low label).

Higher highs, no lows diagramHH

When to use: Short patterns where only the high side qualifies.

Lower highs & higher lowsLH_HL

Highs fall while lows rise — a contracting (symmetrical) triangle.

Lower highs & higher lows diagramLHHLLH

When to use: Anticipate a breakout from a squeeze.

Lower highs & lower lowsLH_LL

Highs and lows both step down — a clean falling channel.

Lower highs & lower lows diagramLHLLLH

When to use: Trade bearish trend continuation.

Lower highs, mixed lowsLH_mixed

Highs step down but the lows have no clear order.

Lower highs, mixed lows diagramLH

When to use: Bearish-leaning structure with choppy support.

Lower highs, no lowsLH_na

Only the highs are defined and they step down.

Lower highs, no lows diagramLH

When to use: Short patterns where only the high side qualifies, bearish.

Mixed highs, higher lowsmixed_HL

Lows step up but the highs have no clear order.

Mixed highs, higher lows diagramHL

When to use: Bullish-leaning structure with choppy resistance.

Mixed highs, lower lowsmixed_LL

Highs have no clear order but the lows step down.

Mixed highs, lower lows diagramLL

When to use: Bearish-leaning structure with choppy resistance.

Mixed highs & lowsmixed_mixed

Neither highs nor lows follow a clear order — pure chop.

Mixed highs & lows diagram

When to use: Admit ambiguous structure your other filters refine.

No highs, higher lowsna_HL

Only the lows are defined and they step up.

No highs, higher lows diagramHL

When to use: Short patterns where only the low side qualifies, bullish.

No highs, lower lowsna_LL

Only the lows are defined and they step down.

No highs, lower lows diagramLL

When to use: Short patterns where only the low side qualifies, bearish.

No highs, no lowsna_na

Too few pivots to label either side (a degenerate envelope).

No highs, no lows diagram

When to use: Admit the shortest patterns that carry no channel label.

Net drifts options

Upup

Admit patterns whose last pivot is above the first — a net upward drift.

Up diagram

When to use: Long-biased filtering on overall direction.

Downdown

Admit patterns whose last pivot is below the first — a net downward drift.

Down diagram

When to use: Short-biased filtering on overall direction.

Peak positions options

Firstfirst

The pattern's highest pivot is its very first one.

First diagram

When to use: Patterns that top out immediately then unwind.

Interiorinterior

The highest pivot sits somewhere in the middle of the pattern.

Interior diagram

When to use: Symmetrical peaks like a head between two shoulders.

Lastlast

The highest pivot is the most recent one — the pattern is making new highs.

Last diagram

When to use: Breakout / new-high continuation setups.

Code match mode options

Includeinclude

The codes list is an allow-list — a pattern passes only if its code is in the set.

Include diagrambundlein libool

When to use: Trade an explicit short-list of named shapes.

Excludeexclude

The codes list is a block-list — a pattern passes unless its code is in the set.

Exclude diagrambundlenot ibool

When to use: Let everything through except a few shapes you avoid.

Configuration

modeenum

Picks which boolean filter to run (direction, swing profile, envelope, net drift, peak position, code, or retracement) and reveals that mode's options.

Choices:direction_filterswing_profile_filterenvelope_filternet_drift_filterpeak_position_filtercode_filterretracement_filter
submodeenum

In direction_filter mode, whether to test the pattern's first leg or its last leg.

Choices:first_leglast_leg
directionenum

In direction_filter mode, the required direction - up, down, or any (any acts as a pass-through).

Choices:updownany
swing_profilesmulti_enum

In swing_profile_filter mode, the set of swing profiles to admit (single, expanding, contracting, stable, mixed).

Choices:singleexpandingcontractingstablemixed
envelopesmulti_enum

In envelope_filter mode, the set of high/low channel labels to admit (e.g. HH_HL for a rising channel).

Choices:HH_HLHH_LLHH_mixedHH_naLH_HLLH_LLLH_mixedLH_namixed_HLmixed_LLmixed_mixedna_HLna_LLna_na
net_driftsmulti_enum

In net_drift_filter mode, whether to admit patterns drifting up, down, or both from first pivot to last.

Choices:updown
peak_positionsmulti_enum

In peak_position_filter mode, where the highest pivot sits - first, interior, or last.

Choices:firstinteriorlast
codesmulti_enum

In code_filter mode, the exact pattern codes to match, validated against the live catalog and the upstream leg count.

code_match_modeenum

Whether the codes list is an allow-list (include) or a block-list (exclude).

Choices:includeexclude
min_retracement_pctscalar

In retracement_filter mode, the minimum pullback depth (percent) of the last leg; 38.2 is the classic lower bound.

min_retracement_pct diagram38.2%
max_retracement_pctscalar

In retracement_filter mode, the maximum pullback depth (percent) of the last leg; 78.6 is the common upper bound.

max_retracement_pct diagram78.6%
live_after_last_pivotscalar

Off fires only on the bar the pattern's last pivot lands; on fires on later bars using the carried-forward classification.

live_after_last_pivot diagram

Connects to

Reads from
Feeds into

Examples

  • Filter: only allow long signals when the direction_filter reports the first leg is up.
  • Use retracement_filter with a 38.2 to 78.6 range to admit only pullbacks inside the classic Fibonacci zone.

Common mistakes

  • Picking swing profiles, envelopes, or peak positions the upstream pattern can never produce for its leg count, which fails the sync validator.
  • Using include match mode with an empty codes list, which never matches anything (an empty exclude list always passes instead).

See also