# Flat Base

Detects IBD-style flat bases: shelves of at least 5 bars correcting no more than 15% after a prior advance of 20% or more, boxed live with a pivot buy line, a range-low stop reference and a quality grade built from tight closes and contracting volume. Breakouts through the pivot are split into volume-confirmed and weak-volume events, with four alerts covering formation through invalidation.

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

**Flat Base** watches for the quietest of the growth-stock bases and manages it from shelf to breakout, the written [flat base](https://www.luxalgo.com/library/concept/flat-base/) specification's first dedicated detector. A shelf qualifies once it spans the minimum length, corrects less than the depth cap and, by default, follows a meaningful advance; the build boxes it live, sets the buy point a margin over the range high, keeps the range low as the stop reference, grading it by tight closes and contracting volume.

## How to Trade the Flat Base?

- **Pivot cleared on volume**: a break through the buy line at or above the volume multiple prints the volume-confirmed label, the textbook resolution.
- **Weak-volume break**: clearing the pivot without expansion is flagged and alerted separately.
- **Invalidation**: the correction exceeding the depth cap recolors and ends the base.
- **Grade**: the info label reads Tight, Average or Loose, downgrading wide-and-loose shelves that merely meet the depth rule.

Flat bases read best on weekly charts, home of the five-week convention.

## Flat Base Settings

- **Minimum Base Length** (default 5): fewest bars of sideways trade.
- **Maximum Base Depth %** (default 15): the high-to-low correction cap.
- **Require Prior Advance** (on) with **Prior Advance %** (default 20) and **Prior Advance Lookback** (default 40): the second-stage requirement.
- **Breakout Trigger** (default Close above pivot); High above pivot fires intrabar.
- **Pivot Margin %** (default 0.1): the buy point's margin above the range high.
- **Breakout Volume × Average** (default 1.4) and **Average Volume Length** (default 10): the confirmation multiple and its baseline, also the in-base contraction reference.
- **Tight Closes: Max Avg Close Change %** (default 2.5): the bound feeding the grade.
- Display: **Show Base Box**, **Show Pivot Line**, **Show Range Low Line (Stop Reference)**, **Show Base Info Label**, **Show Breakout & Failure Markers** (all on).

## Frequently Asked Questions

### How does a flat base differ from an ascending base?

An [Ascending Base](https://www.luxalgo.com/library/indicator/ascending-base/) is built from three successive pullbacks, each bottoming higher; the flat base is a single tight shelf that corrects the least of the classic structures. Both presume a prior advance, digested here through time rather than price.

### Why did a forming base suddenly end?

Its range depth exceeded the Maximum Base Depth %, the defining boundary. The box recolors, a failure marker prints, and detection waits for a fresh shelf.

### What does the quality grade measure?

Average close-to-close change inside the base against the tight-closes bound, and in-base volume against the pre-base baseline. Both passing reads Tight, one Average, neither Loose: context, not a signal.

## Related indicators

- [Ascending Base](https://www.luxalgo.com/library/indicator/ascending-base/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/ascending-base.md
- [O'Neil Base Analysis](https://www.luxalgo.com/library/indicator/oneil-base-analysis/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/oneil-base-analysis.md
- [Double-bottom Base](https://www.luxalgo.com/library/indicator/double-bottom-base/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/double-bottom-base.md
- [IPO Base](https://www.luxalgo.com/library/indicator/ipo-base/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/ipo-base.md
- [Gap Fill Breakouts](https://www.luxalgo.com/library/indicator/gap-fill-breakouts/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/gap-fill-breakouts.md
- [On-neck / In-neck / Thrusting](https://www.luxalgo.com/library/indicator/on-neck-in-neck-thrusting/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/on-neck-in-neck-thrusting.md
- [Rising/falling Three Methods](https://www.luxalgo.com/library/indicator/rising-falling-three-methods/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/rising-falling-three-methods.md
- [Swing Highs/Lows & Candle Patterns](https://www.luxalgo.com/library/indicator/swing-highs-lows-candle-patterns/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/swing-highs-lows-candle-patterns.md

---

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