# Gann Box

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

A Gann Box between a swing low and swing high, anchored automatically to confirmed swings (Swing Length 20) or snapped to the extremes of a manual date range, and subdivided in both price and time: Eighths by default, with Quarters, Thirds, Halves or Fibonacci schemes. Corner diagonals, squaring intersections, right-extended levels and projected time divisions are optional.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Feb 22, 2026.
- Access: free.
- Concepts: [Gann Box](https://www.luxalgo.com/library/concept/gann-box/) (primary), [Gann Method](https://www.luxalgo.com/library/concept/gann-method/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=d1xicmd9wc18dl56ov1qao7q
- Page: https://www.luxalgo.com/library/indicator/gann-box/

**Gann Box** frames a swing inside a rectangle and divides it in both dimensions at once: horizontal lines split the price range into fixed fractions, vertical lines split the elapsed time the same way, and corner diagonals tie the two together. It is a disciplined take on the [Gann Box](https://www.luxalgo.com/library/concept/gann-box/): reproducible anchors, explicit fraction schemes, and alerts on every level interaction.

## How to Trade the Gann Box?

- **Internal level crossings**: closes through a price division; the 50% midline, drawn in its own color, typically draws the most attention.
- **Box edge breaks**: a close above the top or below the bottom ends the range read; with Extend Price Levels Right on, the edges and divisions carry forward as breakout and retest references.
- **Time divisions**: with Project Time Grid Forward on, the time rhythm repeats one box-width ahead as timing windows; reaching one fires an alert.
- **Squaring points**: dots where the diagonals cross the grid, the bars where the elapsed-time fraction matches the price fraction.

## Gann Box Settings

- **Anchor Mode** (default Auto (Swings)); **Swing Length** (default 20): bars each side a point must dominate. Larger anchors the box on more significant swings.
- **Anchor Source** (default Wicks): corners on highs/lows or on closes; keep one convention so boxes stay reproducible.
- **Range Start / Range End** (defaults 1 Jan 2026 / 1 Mar 2026): the window scanned in Manual (Range) mode. It only needs to bracket the swing.
- **Divisions** (default Eighths): Quarters, Thirds, Halves or Fibonacci (23.6/38.2/50/61.8/78.6%) as alternatives.
- **Corner Diagonals** (on), **Diagonal Intersections** (on), **Extend Price Levels Right** (off), **Project Time Grid Forward** (off), **Price Labels** and **Time Labels** (on).
- Border, fill, grid, midpoint and diagonal colors plus **Label Size** (default Small) are cosmetic.

## Frequently Asked Questions

### Gann Box or Gann Fan & Angles?

The box divides one finished swing internally; the [Gann Fan & Angles](https://www.luxalgo.com/library/indicator/gann-fan-and-angles/) projects fixed-rate angles forward from a single pivot. Use the box to structure a completed range and the fan to track a developing trend from its origin.

### Which division scheme should I pick?

Eighths is the traditional scheme and already contains the quarters and the 50% midpoint; coarser schemes reduce clutter and Fibonacci swaps in retracement ratios. Whichever you choose, keep it constant across charts.

### Does chart scale matter?

For the diagonals, yes: they are computed in linear price, so switching between linear and logarithmic scale changes how they render against bars. The horizontal and vertical divisions are unaffected. Keep one scale convention.

## Related indicators

- [Gann Fan & Angles](https://www.luxalgo.com/library/indicator/gann-fan-and-angles/) (Gann Method): markdown at https://www.luxalgo.com/library/indicator/gann-fan-and-angles.md
- [Volumetric Regression Heatmap](https://www.luxalgo.com/library/indicator/volumetric-regression-heatmap/) (Linear-regression Channel): markdown at https://www.luxalgo.com/library/indicator/volumetric-regression-heatmap.md
- [Trendlines with Breaks](https://www.luxalgo.com/library/indicator/trendlines-with-breaks/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/trendlines-with-breaks.md
- [Trendline Breakout Navigator](https://www.luxalgo.com/library/indicator/trendline-breakout-navigator/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/trendline-breakout-navigator.md
- [FVG Channel](https://www.luxalgo.com/library/indicator/fvg-channel/) (Parallel Channel): markdown at https://www.luxalgo.com/library/indicator/fvg-channel.md
- [Gann Square of 9 Vibration Levels](https://www.luxalgo.com/library/indicator/gann-square-of-9-vibration-levels/) (Gann Square of 9): markdown at https://www.luxalgo.com/library/indicator/gann-square-of-9-vibration-levels.md
- [Trendlines with Breaks Oscillator](https://www.luxalgo.com/library/indicator/trendlines-with-breaks-oscillator/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/trendlines-with-breaks-oscillator.md
- [Zig Zag Channels](https://www.luxalgo.com/library/indicator/zig-zag-channels/) (Parallel Channel): markdown at https://www.luxalgo.com/library/indicator/zig-zag-channels.md

---

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