All indicators

Impulse Leg

By LuxAlgoJun 3, 2026

Impulse Leg is an indicator on Vela, our next-generation charting platform, written in Pine Script®.

Static chart image

Impulse Leg classifies every completed leg of a swing zigzag against five measurable criteria and labels the qualifiers on the chart. Each leg is judged relative to its neighbors (travel and per-bar speed versus the prior legs' average, directional candle share, bar-to-bar overlap, and internal pullback) so an impulse leg is recognized as traders read one: more ground in less time, one-sided, barely resting.

How to Trade the Impulse Leg?

  • Impulse label: a fast, one-sided leg that also took out the prior same-side swing. Trend direction is defined by these.
  • Candidate label: dashed and faded: impulse quality without the structural break, an early sign of pressure building.
  • Origin level: the dotted line at the latest impulse's start doubles as invalidation. Price back through it fully unwinds the leg.
  • Extreme level: with the origin it frames retracement and projection measurements; hover a label for its statistics.

The dashboard scores the newest completed leg criterion by criterion, so borderline classifications are transparent rather than binary.

Impulse Leg Settings

  • Swing Length (default 10): bars each side to confirm a swing.
  • Prior Legs to Compare (default 4): the neighbor baseline legs are judged against.
  • Min Distance Ratio (default 1) and Min Speed Ratio (default 1.25): required multiples of the prior legs' average travel and distance per bar.
  • Min Directional Candles % (default 60): minimum share of candles closing in the leg direction.
  • Max Bar Overlap % (default 50): average overlap allowed between consecutive candle ranges.
  • Max Internal Pullback % (default 50): deepest pause allowed as a share of total travel.
  • Break Requires Close Beyond Swing (default disabled): require a close beyond the prior swing point.
  • Line width, labels, candidates, the swing framework, levels, and the dashboard are style options.

Frequently Asked Questions

Free to use

Run it on Vela. Go further with a paid plan.

  • Up to 500 Custom Alerts, with webhook automation
  • Up to 10× the chart history of Free
  • Orderflow lookback up to full history
  • More Quant usage to customize it, plus extra usage when you need it
  • Futures data alongside crypto, stocks, forex and commodities
See plans
Original indicatorBuilt in-house by LuxAlgo

Run it on Vela. Make it yours with Quant.

Open this indicator free on Vela, our next-generation charting platform. Then ask Quant, our coding agent built into Vela, to retune it or turn it into a backtested strategy of your own.