# Inverted Hammer

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

Detects inverted hammers by measurable proportions (an upper shadow at least 2x the real body, a lower shadow within 10% of range) and only after an established decline. Each detection is tracked through a 3-bar confirmation window with dashed trigger and stop levels, volume grading via an IH+ tag, and alerts covering detection, every confirmation rule, and invalidation.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jun 21, 2026.
- Access: free.
- Concepts: [Inverted Hammer](https://www.luxalgo.com/library/concept/inverted-hammer/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=vb1q7i27rhg47s4wv79960oa
- Page: https://www.luxalgo.com/library/indicator/inverted-hammer/

**Inverted Hammer** detects the single-candle bottom-reversal candidate with measurable proportions, then manages what matters most: confirmation. A qualifying [inverted hammer](https://www.luxalgo.com/library/concept/inverted-hammer/) needs an upper shadow at least twice the real body, a lower shadow within 10% of the range, a real body of at least 5%, and a decline into the candle.

## How to Trade the Inverted Hammer?

- **Tentative IH tag**: a candidate only. The candle closes weak by construction, so nothing is implied until follow-through appears.
- **Confirmation triangle**: fires when the next candle gaps above the body or closes bullish, or price trades above the pattern high in the window.
- **Trigger and stop lines**: entry above the pattern high, invalidation below the pattern low, drawn while it is pending.

Each pattern resolves within the window as confirmed, invalidated, or expired; set the window to 1 for the strict next-candle reading.

## Inverted Hammer Settings

- **Minimum Upper Shadow / Body Ratio** (default 2), **Maximum Lower Shadow (%)** (default 10), **Minimum Real Body (%)** (default 5): the shape tests: shadow multiple, shaved-low tolerance, and the body floor that excludes gravestone-style doji.
- **Bullish Body Only** (default disabled): classical references accept either body color.
- **Decline Detection** (default Price Below SMA) with **SMA Length** (default 50) and **Decline Lookback** (default 5): how the decline into the candle is established.
- **Confirmation Window** (default 3): bars allowed before an unconfirmed pattern is set aside; the gap-up, bullish-close, and trade-above-high rules all default on.
- **Volume Grading** (default Highlight), **Volume Average Length** (default 20), **Elevated Volume Multiple** (default 1.5): participation grading. An IH+ tag marks elevated volume; bypassed without volume data.
- Labels, levels, resolution markers, and colors are style options.

## Frequently Asked Questions

### Why isn't the same shape detected after a rally?

Location defines the pattern: after an advance the identical candle is a shooting star, which this script deliberately ignores. The decline test is measured one bar back, so the pattern candle never shapes its own baseline.

### How does it relate to the Morning Star?

A confirmed inverted hammer with a gap down before and a strong close after approximates the three-bar [Morning Star](https://www.luxalgo.com/library/indicator/morning-star/) structure. The single-candle form gives earlier notice at lower reliability, hence confirmation, not detection, is the actionable event.

### What invalidates a pending pattern?

Price trading below the pattern low before any confirmation rule fires, marked with a cross and alerted. Unconfirmed patterns that outlive the window are set aside as noise.

## 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/inverted-hammer/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
