# Gann Box

A Trend concept (Channels, lines & geometry) in the LuxAlgo Library, with 1 indicator implementation.

## What is a Gann Box?

A Gann Box is a rectangular chart overlay anchored between two significant points, usually a major swing low and swing high, that subdivides the move in both price and time. The vertical side is split into fixed fractions (halves, quarters, and eighths are traditional; many versions offer Fibonacci ratios instead), the horizontal side divides the elapsed time the same way, and diagonals connect the corners. The tool descends from W.D. Gann's premise that price and time are proportional, so meaningful turns tend to occur where the two 'square': at intersections of the price divisions, the time divisions, and the diagonals.

William Delbert Gann (1878-1955) was an American commodities and stock trader who sold courses and books from the 1920s through the 1950s describing geometric methods: squaring price with time, angle lines, and calculators such as the Square of Nine. His writing is famously opaque, and independent verification of his results is thin, so the modern Gann Box is best understood as a charting-platform formalization of his squaring ideas rather than a tool he demonstrably drew in this exact form.

Mechanically, the box converts one anchor swing into a grid of references. The horizontal divisions are fractions of the move's height, the verticals are fractions of its duration, and the corner diagonals are constant-rate paths, in effect pre-drawn [trendlines](https://www.luxalgo.com/library/concept/trendline/) sloped by the box's proportions rather than by fitted pivots. Chart scale matters: switching between linear and log scale redraws the diagonals, so a box is only reproducible if the scale is held constant.

In practice, the internal horizontal lines serve as candidate support and resistance within the boxed range, the vertical lines as timing windows worth watching, and diagonal intersections as points of heightened interest. None of this is mechanical: the box only re-expresses the anchor swing as a grid, so anchor selection drives everything, and two traders can draw materially different boxes on the same chart. Reactions at box levels are possibilities to plan around, not predictions; a [reversal](https://www.luxalgo.com/library/concept/reversal/) that begins at one is confirmed by price behavior, not by the grid.

## How to draw a Gann Box

The construction is simple; the judgment is in the anchors and in consistent settings.

1. Pick the anchor swing: a swing low to swing high (or high to low) that defines a move significant on your trading timeframe.
2. Set the box corners on those two extremes, using wicks or closes consistently, so the box spans the move's full price range and elapsed time.
3. Enable the divisions you intend to use: halves, quarters, and eighths are traditional on both axes; many tools offer 0.382/0.5/0.618-style ratios instead.
4. Hold the chart scale constant: moving between linear and log scale relocates the diagonals, so pick one convention and keep it.
5. Mark the intersections near current price: horizontal divisions as levels, verticals as timing windows, and diagonal crossings as the higher-interest spots to watch.

## How it's calculated

A price-time grid stretched between two anchor pivots, subdivided at fixed ratios of the box's price and time ranges.

```
1. Anchor the box at two pivots: (t_1, P_1) at a significant swing low or high, (t_2, P_2) at the opposing swing.
2. Compute the box ranges: ΔP = P_2 - P_1 and ΔT = t_2 - t_1.
3. Draw horizontal price levels at P_1 + k × ΔP for each ratio k in the chosen set (commonly 0.25, 0.382, 0.5, 0.618, 0.75, plus the edges 0 and 1).
4. Draw vertical time lines at t_1 + k × ΔT using the same ratios k.
5. Optionally add the corner-to-corner diagonals; the diagonal from (t_1, P_1) to (t_2, P_2) is the primary trend reference.
6. Read level and time-line intersections, and crossings of the diagonals, as candidate support, resistance and turn timing; extend the grid to the right by repeating ΔT if price leaves the box.

  t_1: bar time of the first anchor pivot
  P_1: price of the first anchor pivot
  t_2: bar time of the second anchor pivot
  P_2: price of the second anchor pivot
  ΔP: box price range, P_2 - P_1
  ΔT: box time range in bars, t_2 - t_1
  k: subdivision ratio from the platform's set (quarters, eighths or Fibonacci ratios)
```

There is no single canonical ratio set: Gann's squares used eighths (steps of 0.125), while modern platforms default to quarters plus 0.382 and 0.618.

Every level is a geometric consequence of the two anchors, so anchor selection determines the entire grid.

Some implementations square price and time, scaling so ΔP maps onto ΔT and the main diagonal runs at 45 degrees.

## How traders use it

- As retracement-style levels: watching for reactions at the internal price divisions of the boxed swing, with the midpoint drawing the most attention, similar in spirit to a Fibonacci retracement.
- As a timing framework: the time divisions mark windows where Gann-oriented traders look for turns, comparable in intent to Fibonacci time tools.
- As confluence: an intersection of box geometry with an independently derived level, such as a prior high, a flat long-period [SMA](https://www.luxalgo.com/library/concept/sma/), or a [Supertrend](https://www.luxalgo.com/library/concept/supertrend/) flip level, is treated as higher-interest than either alone.
- As breakout context: once price leaves the box entirely, the exited edge becomes the reference for [breakout](https://www.luxalgo.com/library/concept/breakout/) and retest tactics; some practitioners project a fresh box forward from the exit.
- As a standardizing grid in review: the box freezes one swing's proportions, letting traders measure pullback depth and elapsed time the same way across many trades.

## Gann Box vs other level frameworks

- **Trendline** (https://www.luxalgo.com/library/concept/trendline/): A trendline is fitted to actual pivots and updates as new swings form, so it encodes observed behavior. Gann Box diagonals are fixed the moment the box is anchored, encoding an assumed price-time proportion instead. Fitted lines adapt to the market; box geometry commits in advance.
- **Dynamic S/R Via MA** (https://www.luxalgo.com/library/concept/dynamic-s-r-via-ma/): Moving-average support and resistance recalculates every bar, answering 'where is the trend now'. Box levels are static once drawn, derived from one historical swing, answering 'how does price relate to that reference move'. One adapts continuously; the other frames a fixed episode.
- **MA Envelope** (https://www.luxalgo.com/library/concept/ma-envelope/): An envelope wraps bands a set percentage around a moving average, framing price continuously as it evolves. A Gann Box frames one bounded episode with a defined start and end in price and time. Envelopes suit ongoing mean-reversion reads; boxes suit measuring one completed swing.

## FAQ

### What is the difference between a Gann Box and a Fibonacci retracement?

A Fibonacci retracement divides only the price axis of a swing. A Gann Box divides price and time together and adds corner diagonals, because Gann's method treats when a turn happens as seriously as where. Many box implementations offer Fibonacci ratios for their internal divisions, so the price levels can coincide; the time grid and the diagonals are what the box adds.

### Do Gann Box levels actually work?

Not reliably on their own, and there is no rigorous public evidence that squaring price and time works as a rule. Box levels behave like any derived levels: some see reactions, many do not, and changing the anchor changes all of them. Most practitioners treat the box as a framework for organizing levels and timing, then require confirmation before acting.

### What anchor points should a Gann Box use?

The standard choice is a swing low and swing high bounding a move that matters on your trading timeframe, anchored to wicks or closes consistently. There is no objective rule, which is the tool's main weakness: reasonable analysts anchor differently and get different grids. Many users check whether a candidate box's midpoint lined up with past reactions before trusting its forward levels.

### Should the box use eighths or Fibonacci ratios?

Traditional Gann practice divides by eighths, giving the 50% line plus the quarter and eighth levels; many platform implementations offer Fibonacci ratios instead. No division scheme has demonstrated systematic superiority in public testing. The practical advice: pick one convention, keep it constant, and judge it by how price actually behaves at its levels.

### Does the Gann Box work on intraday charts?

It can be drawn on any timeframe, since the construction only needs a swing and its elapsed time. Intraday anchors are more numerous and less distinct, so grids multiply and overlap quickly. Intraday users usually restrict boxes to session-defining swings, the opening range or the prior day's extremes, to keep the level count manageable.

## Implementations in the Library

- Gann Box (LuxAlgo): https://www.luxalgo.com/library/indicator/gann-box/

## Related concepts

- Trendline: https://www.luxalgo.com/library/concept/trendline/
- Linear-regression Channel: https://www.luxalgo.com/library/concept/linear-regression-channel/
- Parallel Channel: https://www.luxalgo.com/library/concept/parallel-channel/
- Fan Principle: https://www.luxalgo.com/library/concept/fan-principle/
- Standard-error Channel: https://www.luxalgo.com/library/concept/standard-error-channel/
- Polynomial Regression Band: https://www.luxalgo.com/library/concept/polynomial-regression-band/
- Andrews' Pitchfork: https://www.luxalgo.com/library/concept/andrews-pitchfork/
- Gann Fan & Angles: https://www.luxalgo.com/library/concept/gann-fan-and-angles/
- Gann Square of 9: https://www.luxalgo.com/library/concept/gann-square-of-9/
- Speed Resistance Lines: https://www.luxalgo.com/library/concept/speed-resistance-lines/

---

Source: https://www.luxalgo.com/library/concept/gann-box/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/