Inverted Hammer Candlestick: Downtrend Context and Confirmation
An inverted hammer candlestick has a small body near the low, a long upper wick and little lower wick after a price decline. It is a possible bullish reversal setup. The upper wick shows that price traded above the body but failed to hold those highs by the close; a later move must establish whether the decline actually reverses.
Key Takeaways
- Measure the candle only after it closes, then check the preceding decline separately.
- A shooting star has the same shape after an advance. Trend context changes the interpretation.
- Waiting for the next close above the pattern high adds a condition and a bar of delay; it does not guarantee a better trade.
- Compare confirmed and unconfirmed rules on the same candidates, including failed setups and trading costs.
Measure the body, upper wick and lower wick
An upside down hammer candlestick is another name for this shape. Unlike a hammer, its long wick is above the body. Either body color can qualify under a shape-based definition. OHLC values do not identify which participants traded or reveal the complete intrabar sequence. The following thresholds define an illustrative detector for the examples on this page. They are choices to test, not TradingView defaults. Require a nonzero range and a body at least one minimum price increment wide; otherwise a doji can pass a wick-to-body test simply because its body is zero.
| Measurement | Calculation | Illustrative rule |
|---|---|---|
| Range | High minus low | Greater than zero |
| Body | Absolute difference between close and open | At least one tick and no more than 25% of range |
| Upper wick | High minus the larger of open and close | At least twice the body |
| Lower wick | The smaller of open and close minus low | No more than 10% of range |
Define the decline before comparing shooting stars
TradingView describes the inverted hammer candlestick pattern in a downward trend and provides moving-average trend detection options. Its SMA50 setting compares price with that average; its SMA50/SMA200 setting also checks the ordering of the averages. Disabling trend detection removes that context filter. For the experiment here, use a different, deliberately simple rule: the three completed candles immediately before the candidate must have consecutively lower closes, and the candidate must close below the last of those closes. This captures a short decline, not necessarily a long-term downtrend. Apply it before checking what happens next.
| Pattern | Long wick | Prior context | Question to test |
|---|---|---|---|
| Inverted hammer | Upper | Decline | Does a later candle recover above the pattern high? |
| Shooting star | Upper | Advance | Does a later candle break below the pattern low? |
| Hammer | Lower | Decline | Does price hold above the rejected low and recover? |
A worked inverted hammer example
These hypothetical prices show three declining closes at 108, 105 and 102, followed by a candidate with open 100, high 104, low 99.8 and close 101. Its body is 1, upper wick is 3, lower wick is 0.2 and range is 4.2. The body is about 23.8% of the range and the lower wick about 4.8%, so all the illustrative measurements pass. Assume a minimum tick of 0.1. The next candle closes at 104.5, above the candidate high of 104. That satisfies the confirmation rule below. The diagram stops there: a confirming close does not establish the outcome of a later trade.
| Bar | Open | High | Low | Close |
|---|---|---|---|---|
| Decline 1 | 110 | 111 | 107 | 108 |
| Decline 2 | 108 | 109 | 104 | 105 |
| Decline 3 | 105 | 106 | 101.5 | 102 |
| Candidate | 100 | 104 | 99.8 | 101 |
| Next bar | 101 | 105 | 100.5 | 104.5 |
Hollow bodies close at or above the open. Filled bodies close below the open.
Illustrative OHLC data, not a market chart or a backtest. The candidate is known at its close of 101; confirmation becomes known one bar later at 104.5. Neither close is a guaranteed execution price.
Test an unconfirmed entry against next-bar confirmation
Both variants wait for the pattern candle to close. An open candle can change shape as its high, low and close update. TradingView documents barstate.isconfirmed as true on the closing update of a realtime bar. That fixes the candidate for that bar; it does not confirm a bullish reversal. For a controlled comparison, the unconfirmed variant signals at the candidate close. The confirmed variant signals only if the very next candle closes strictly above the candidate high and never trades below its low. Expire the candidate if that next candle fails either test. This one-bar deadline prevents a much later recovery from being counted as immediate confirmation. With ordinary bar-close calculation and default market-order fills, TradingView usually fills on the following bar open. The unconfirmed variant therefore enters after the candidate; the confirmed variant enters after the confirmation candle. Do not draw the confirmed entry back on the candidate bar. Changing order-processing settings changes this timing.
| Next bar behavior | Unconfirmed variant | Confirmed variant |
|---|---|---|
| Low 100.5; close 104.5 | Already signaled at the candidate close | Signals at this close; default entry is the following open |
| High 104.6; low 100; close 103 | Already signaled | No signal: an intrabar break of 104 is insufficient |
| Low 99.5; close 104.5 | May hit a stop below the candidate low | Rejected: the low was breached despite the higher close |
| Low 98.5; close 99 | Exposed to the continuing decline | No signal; candidate expires |
Keep exits, costs and failed candidates in the comparison
A reproducible test needs exit rules as well as entry labels. One hypothetical specification uses one position at a time, fixed quantity, a protective stop one tick below the candidate low, and a market exit signaled at the fifth completed bar after the fill if the stop has not triggered. Submit the protective stop with the entry order; record the actual fill, including gaps. This is a research specification, not a recommended risk budget. Use the same symbol, ordinary candle chart, session, date range, exit convention, commissions and slippage for both variants. Record every candidate timestamp, whether it confirmed, entry and exit fills, net result, drawdown and sample size. Record signals skipped because another position was open. Keep a separate candidate log: a trade export cannot include setups that never entered. A later entry can skip a falling market, miss an early rebound, or leave a greater distance to the same protective stop. Compare net results and risk rather than assuming that fewer entries or a higher win rate makes confirmation better. Check a separate period before accepting any apparent improvement.
Turn the specification into a script you can inspect
Pineify AI Coding Agent can help draft the shape measurements, decline filter and two entry variants as Pine Script. Ask for separate candidate and confirmation markers, and review order timing before running the strategy in TradingView. Visual Pine Editor includes an Inverted Hammer condition, but its existing shape preset is not the custom detector defined here. Check the generated conditions and add the intended trend and confirmation logic; a matching label does not prove matching rules. Backtest Deep Report can analyze exported TradingView trades from each variant. Keep the failed-candidate log alongside those exports so rejected setups remain visible.
Pineify next step
Draft both entry variants for TradingView
Give AI Coding Agent the measurements, prior-trend rule, confirmation deadline and exits. Inspect the generated script and compare its signals with the worked example before testing historical results.
Educational information, not investment advice. Prices and trading rules shown here are hypothetical examples, not performance evidence. Trading can result in losses, and historical tests do not guarantee future results.