# Flat

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

Detects Elliott flat corrections from confirmed swings: an A-B-C sequence where wave B retraces at least 90% of wave A and sub-wave counts fit the 3-3-5 blueprint, classified as regular, expanded or running. Developing setups project wave C targets at 1.0 and 1.618 extensions of A, completed patterns are drawn with legs, labels and measured ratios, and seven alerts span setups, traps and completions.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Mar 12, 2026.
- Access: free.
- Concepts: [Flat](https://www.luxalgo.com/library/concept/flat/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=rej1a0tmcq8ozhmqg6tmbs90
- Page: https://www.luxalgo.com/library/indicator/flat/

**Flat** detects the sideways member of the Elliott corrective family from confirmed swings and names its variant, the first faithful build of the [flat correction](https://www.luxalgo.com/library/concept/flat/) as written. When an A-B-C sequence prints in which wave B retraces at least the minimum of wave A and the sub-swing counts fit the 3-3-5 blueprint, the build draws the three legs with A, B and C labels, boxes the pattern zone, and reports the measured ratios: Regular when B does not exceed A's start and C ends beyond A's extreme, Expanded when B exceeds A's start and C travels beyond A's extreme, Running when B exceeds A's start but C falls short of A's extreme.

## How to Trade the Flat?

- **Setup projection**: a deep three-wave B confirms ahead of C, so wave C targets project at the configured extensions of A alongside the wave A start and extreme levels; both setup directions are alerted.
- **Wave B trap**: B poking past the start of wave A fires a dedicated warning: that marginal new extreme may be a flat's B wave rather than trend continuation.
- **Completion**: each variant carries its own alert; the running flat is conventionally the most telling, C having failed to reach A's extreme.

## Flat Settings

- **Swing Length** (default 10): pivot length for the A-B-C swings; larger looks for flats at a higher degree.
- **Sub-Wave Length** (default 3): smaller pivot length counting interior sub-swings, kept below the swing length.
- **Sub-Wave Validation** (default Loose): Loose rejects waves A or B that subdivide like clean fives; Strict additionally demands visible threes in A and a five-like C; Off relies on the price rules alone.
- **Wave B Min Retracement** (default 0.9) and **Wave B Max Retracement** (default 1.382): the accepted B window, with **Expanded Threshold** (default 1) splitting regular from expanded and running behavior.
- **Wave C Targets** (defaults 1 and 1.618) with **Project Wave C Targets** (on).
- Style: **Wave Labels** (on) and **Show Swings** (on).

## Frequently Asked Questions

### How is a flat different from a zigzag correction?

A [Zigzag](https://www.luxalgo.com/library/indicator/zigzag/) is the steep 5-3-5 correction whose B wave typically gives back only part of A. The flat's B returns most or all of A, which is why sideways grinds and B-wave traps are its signature.

### Which variant matters most?

A regular flat is the neutral case, an expanded flat stretches both ends of the range, and a running flat (C failing to reach A's extreme) is the classic hint of a strong larger trend.

### Do the drawings update after they appear?

Swings confirm Swing Length bars past their extreme, so patterns arrive with that delay. The most recent pattern can redraw if its final swing extends and the variant is re-evaluated (each change is alerted), and superseded projections are cleared.

## Related indicators

- [Elliott Wave](https://www.luxalgo.com/library/indicator/elliott-wave/) (Impulse): markdown at https://www.luxalgo.com/library/indicator/elliott-wave.md
- [Truncation](https://www.luxalgo.com/library/indicator/truncation/) (Elliott & Harmonics): markdown at https://www.luxalgo.com/library/indicator/truncation.md
- [Elliott Hard Rules](https://www.luxalgo.com/library/indicator/elliott-hard-rules/) (Elliott & Harmonics): markdown at https://www.luxalgo.com/library/indicator/elliott-hard-rules.md
- [Triangle](https://www.luxalgo.com/library/indicator/triangle/) (Elliott & Harmonics): markdown at https://www.luxalgo.com/library/indicator/triangle.md
- [Wave Degree Hierarchy](https://www.luxalgo.com/library/indicator/wave-degree-hierarchy/) (Elliott & Harmonics): markdown at https://www.luxalgo.com/library/indicator/wave-degree-hierarchy.md
- [Diagonals](https://www.luxalgo.com/library/indicator/diagonals/) (Elliott & Harmonics): markdown at https://www.luxalgo.com/library/indicator/diagonals.md
- [Motive Wave](https://www.luxalgo.com/library/indicator/motive-wave/) (Elliott & Harmonics): markdown at https://www.luxalgo.com/library/indicator/motive-wave.md
- [Wave Extension](https://www.luxalgo.com/library/indicator/wave-extension/) (Elliott & Harmonics): markdown at https://www.luxalgo.com/library/indicator/wave-extension.md

---

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