All indicators

Flat

By LuxAlgoMar 12, 2026

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

Static chart image

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 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

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.