Skip to content
StatePath
Tool Atlasinterpretor.leg

Tool

Leg Interpretor

interpretor.leg

InterpretorLeg

Inputs

legBundle (untagged)

A leg.zigzag bundle (one swing) from market.zigzag_patterns; read in decompose mode, ignored in compose.

point_0Bundle (untagged)

The first pivot point (a point.zigzag bundle); used as the leg's start in compose mode.

point_1Bundle (untagged)

The second pivot point (a point.zigzag bundle); used as the leg's end in compose mode. Swapping it with point_0 flips the leg's direction.

Outputs

Bundle (untagged)

An interpreted leg bundle (in decompose: two points + direction; in compose: a full leg with direction, price difference, and bar span) ready to reuse downstream.

A leg is a single zigzag swing between two pivot points. Leg Interpretor converts between a whole leg and its two endpoint points, in either direction, so you can reuse swing data across your strategy.

Leg Interpretor overview diagrampoint_0point_1

How it works

Pick a mode: decompose splits one leg.zigzag bundle into its start point, end point, and direction; compose takes two points and builds a leg, working out direction, price difference, and bar span. It reuses the exact point and leg shapes produced by market.zigzag_patterns, so it wires cleanly either way.

Modes

Decomposedecompose

Splits one leg bundle into its start point, end point, and direction.

Decompose diagramstartend

When to use: Pull the two pivots out of a leg so you can read each one (e.g. the swing high's price).

Composecompose

Takes two points and builds a leg, computing direction, price difference, and bar span.

Compose diagrampoint_0point_1

When to use: Build a leg from two pivots you already have so you can measure the swing's size and direction.

Configuration

modeenum

Direction of the conversion: decompose turns one leg into two points plus direction; compose turns two points into one leg.

Choices:decomposecompose

Connects to

Reads from
Feeds into

Examples

  • Decompose a leg from market.zigzag_patterns, then send its end point into a Point Interpretor to read that pivot's price.
  • Compose a leg from two pivot points so you can measure the swing's size and direction downstream.

Common mistakes

  • Wiring the wrong handles for the chosen mode -- decompose needs a leg input, compose needs two point inputs.
  • Swapping point_0 and point_1 in compose mode, which flips the leg's direction and price difference.

See also