# Structure Invalidation

Structure Invalidation is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Tracks the swing level a structural trade thesis depends on and referees its break mechanically: a 10-bar swing rule pins the protected level, a pre-chosen rule (close beyond, by default) declares invalidation, and each break is graded as displaced or not against a 14-period ATR, and tagged reclaimed if price closes back through the level within 3 bars. A gradient fill shows the room left before the thesis dies, with four alerts on breaks and reclaims.

- Indicator in the LuxAlgo Library, by LuxAlgo, published May 23, 2026.
- Access: free.
- Concepts: [Structure Invalidation](https://www.luxalgo.com/library/concept/structure-invalidation/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=fugp6gffg6oaug2lntihx42h
- Page: https://www.luxalgo.com/library/indicator/structure-invalidation/

**Structure Invalidation** keeps the level that would prove a structural thesis wrong visible at all times, the first dedicated build of [structure invalidation](https://www.luxalgo.com/library/concept/structure-invalidation/) as its own tool. A swing rule confirms pivots, the newest one in the thesis direction becomes the protected swing, and its level extends right. When the rule declares a decisive break, an Invalidation label prints, the line freezes, the bias flips and the panel updates. The stated rule applies mechanically, never renegotiated.

## How to Trade the Structure Invalidation?

- **Invalidation event**: the protected swing breaks per the active rule. The thesis is falsified, and the same break opens the opposite structure.
- **Displaced or not**: the label tooltip reports whether the breaking close cleared the level by the Displacement Multiple in ATRs. Displacement argues a genuine break over a sweep.
- **Reclaimed**: a close back through within the Acceptance Window retags the event as sweep-like; the structure stays invalid either way.
- **Distance fill**: the gradient between price and the level shows the room the thesis has left.

## Structure Invalidation Settings

- **Swing Length** (default 10): bars each side confirming a swing; larger values track external structure, smaller internal.
- **Invalidation Rule** (default Close beyond level): also Wick beyond level (fastest, most sweep-exposed) or Higher timeframe close.
- **Higher Timeframe** (default 240 minutes): timeframe the HTF rule closes on; falls back to a chart close if not higher.
- **ATR Length** (default 14) and **Displacement Multiple** (default 1.0): the yardstick for grading break character.
- **Acceptance Window** (default 3): bars in which a close back through tags the break as reclaimed.
- Display: **Distance To Invalidation Fill** and **Show Thesis Panel** (both on), **Label Size** (Small).

## Frequently Asked Questions

### How is this different from a reversal detector like the 1-2-3?

A [1-2-3 Reversal](https://www.luxalgo.com/library/indicator/1-2-3-reversal/) hunts a specific entry pattern and manages its trigger. This build manages the falsification side of any structural idea: it names the level that kills the thesis and referees the break, whatever setup created the position.

### Does the protected level repaint?

The level only moves when a fresh swing confirms: Swing Length bars after its extreme, ordinary confirmation delay. Events fire against the level as drawn and are never revised; only the reclaim tag can be appended within the Acceptance Window.

### Which alerts are included?

Four: Bullish Structure Invalidated, Bearish Structure Invalidated, a combined Any Structure Invalidation, and Broken Level Reclaimed for the sweep-like aftermath.

## Related indicators

- [Smart Money Concepts (SMC)](https://www.luxalgo.com/library/indicator/smart-money-concepts-smc/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/smart-money-concepts-smc.md
- [Structure & Trend Dashboard](https://www.luxalgo.com/library/indicator/structure-trend-dashboard/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/structure-trend-dashboard.md
- [FVG + Liquidity Sweep + CISD](https://www.luxalgo.com/library/indicator/fvg-liquidity-sweep-cisd/) (Change of Character): markdown at https://www.luxalgo.com/library/indicator/fvg-liquidity-sweep-cisd.md
- [MSS Sweep Fib Retrace](https://www.luxalgo.com/library/indicator/mss-sweep-fib-retrace/) (Change of Character): markdown at https://www.luxalgo.com/library/indicator/mss-sweep-fib-retrace.md
- [HTF CISD Projections](https://www.luxalgo.com/library/indicator/htf-cisd-projections/) (Change of Character): markdown at https://www.luxalgo.com/library/indicator/htf-cisd-projections.md
- [HTF Sweep Signals](https://www.luxalgo.com/library/indicator/htf-sweep-signals/) (Swing Failure Pattern): markdown at https://www.luxalgo.com/library/indicator/htf-sweep-signals.md
- [Liquidity Structure & Order Flow](https://www.luxalgo.com/library/indicator/liquidity-structure-order-flow/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/liquidity-structure-order-flow.md
- [Market Structure Break & OB Probability Toolkit](https://www.luxalgo.com/library/indicator/market-structure-break-ob-probability-toolkit/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/market-structure-break-ob-probability-toolkit.md

---

Source: https://www.luxalgo.com/library/indicator/structure-invalidation/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
