# Gravestone Doji

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

Flags inverted-T candles where the body is at most 5% of the range, the lower shadow no more than 10%, and the upper shadow at least twice the body and one 14-period ATR, by default only after price closes above a 50-bar trend average. Dashed trigger and stop levels track each pattern through a 3-bar confirmation window, with alerts on detection, confirmation and invalidation.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jul 6, 2026.
- Access: free.
- Concepts: [Gravestone Doji](https://www.luxalgo.com/library/concept/gravestone-doji/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=hg651vvj23z4fnc3cpz08tqc
- Page: https://www.luxalgo.com/library/indicator/gravestone-doji/

**Gravestone Doji** detects the inverted-T session (open, close and low pressed together under a long upper shadow) and manages what happens next, the first library implementation of the [gravestone doji](https://www.luxalgo.com/library/concept/gravestone-doji/). Qualifying candles after an advance are labeled at the high, a dashed trigger line extends from the body bottom and a dashed stop line from the shadow high, and each pattern resolves inside a confirmation window: a triangle prints when a close confirms the topping read, an x-cross when it is invalidated. Gravestones after a decline can optionally be labeled as recovery probes instead.

## How to Trade the Gravestone Doji?

- **Gravestone label prints**: the bar's push higher failed completely. An alert fires, but the classical treatment waits for confirmation before acting.
- **Confirmation triangle**: a close below the gravestone body within the window activates the bearish reading; the shadow high is the natural stop reference.
- **Invalidation x-cross**: a close back above the shadow high means the refused prices were accepted after all, and the pattern is dropped.
- **Recovery probes**: with the decline option on, gravestones below the trend average are marked as indecisive recovery attempts, with their own alert.

## Gravestone Doji Settings

- **Maximum Body Size %** (default 5): how close open and close must sit, as a share of the bar range.
- **Maximum Lower Shadow %** (default 10): keeps open, close and low together.
- **Minimum Shadow / Body Ratio** (default 2) and **Minimum Shadow Length** (default 1) x **ATR** (default 14): the upper shadow must be long against both the body and recent bars.
- **Require Prior Advance** (default enabled) with **Trend SMA Length** (default 50); **Flag Gravestones After A Decline** (default disabled).
- **Require Elevated Volume** (default disabled) with **Minimum Volume** (default 1.5) x **SMA** (default 20).
- **Confirmation Window (Bars)** (default 3) and **Trigger & Stop Levels** (default enabled).

## Frequently Asked Questions

### How does it relate to the Dragonfly Doji?

They are mirror images. The [Dragonfly Doji](https://www.luxalgo.com/library/indicator/dragonfly-doji/) presses open, close and high together over a long lower shadow (a refused excursion lower, watched after declines) while the gravestone records a refused excursion higher at tops.

### Why require a prior advance?

The topping read needs higher prices to refuse; mid-range, the same candle is mostly noise. Disable the filter to see every qualifying shape.

### What counts as confirmation here?

A close below the gravestone's body within the Confirmation Window, three bars by default. A close back above the shadow high before that voids the pattern, and both outcomes carry their own alert.

## Related indicators

- [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/) (Hammer): markdown at https://www.luxalgo.com/library/indicator/swing-highs-lows-candle-patterns.md
- [Reversal Candlestick Structure](https://www.luxalgo.com/library/indicator/reversal-candlestick-structure/) (Hammer): markdown at https://www.luxalgo.com/library/indicator/reversal-candlestick-structure.md
- [Candlestick Structure](https://www.luxalgo.com/library/indicator/candlestick-structure/) (Doji): markdown at https://www.luxalgo.com/library/indicator/candlestick-structure.md
- [Evening Star](https://www.luxalgo.com/library/indicator/evening-star/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/evening-star.md
- [Hanging Man](https://www.luxalgo.com/library/indicator/hanging-man/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/hanging-man.md
- [Candlestick Channels](https://www.luxalgo.com/library/indicator/candlestick-channels/) (Hammer): markdown at https://www.luxalgo.com/library/indicator/candlestick-channels.md

---

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