Hammer candlestick: confirmation and failures

A hammer candlestick has a small body near the top of its range and a lower shadow at least twice the body length. After a decline, it marks a possible bullish reversal. A red or green body can qualify. The candle records a recovery from its low; it does not establish that the downtrend has ended. Confirmation requires later price action.

Key Takeaways

  • A hammer needs both the lower-shadow shape and a stated downtrend context.
  • Red and green bodies can qualify; neither color replaces confirmation.
  • A confirmation decision belongs to the bar on which it becomes known, and it can still be followed by failure.

Measure the body and shadows before naming the pattern

For an ordinary OHLC candle, the body is the absolute difference between close and open. The lower shadow runs from the low to the lower of open and close; the upper shadow runs from the higher of open and close to the high. StockCharts describes a lower shadow at least twice the body and little or no upper shadow. The extra cutoffs below are illustrative detection choices, not a universal definition or an optimized trading rule.

One explicit hammer detection specification to test
MeasurementIllustrative requirementReason
RangeHigh minus low must be positiveExclude bars with no price range.
BodyMore than zero and at most 30% of the rangeKeep a small real body; classify exact doji separately.
Lower shadowAt least 2 times the bodyRequire the defining long lower shadow.
Upper shadowAt most 10% of the rangeGive the short upper shadow a numeric limit.
TrendHammer close below the 50-period SMAUse a stated downtrend filter instead of shape alone.
  • A near-zero body can pass a wick-to-body ratio too easily. Test a minimum body size relative to the market tick size if such candles dominate the results.
  • TradingView offers SMA50, SMA50 with SMA200, or no trend detection for its Hammer indicator. These settings can produce different labels on the same chart.
  • The table is a custom specification. It is not a claim that TradingView or Pineify uses these exact thresholds by default.

Red hammer, green hammer, or hanging man?

Color describes the open-to-close change; trend context gives the shape its name. A red hammer candlestick closes below its open but can still finish far above its low. A green hammer candlestick closes above its open. Neither color establishes a win rate, and green alone does not confirm the next bar will rise.

The same lower-shadow shape has different context
CandleRequired contextWhat to check next
Red hammerDecline before the candle; close below openLater bullish confirmation, using the same rule as a green hammer.
Green hammerDecline before the candle; close above openWhether later price clears the chosen confirmation level.
Hanging manAdvance before the candlePossible bearish reversal context; do not label it a bullish hammer.
Inverted hammerDecline, but the long shadow is above the bodyA different shape with its own confirmation requirements.

Separate a completed hammer from a confirmed setup

Use two timestamps: the hammer close and the confirmation close. For the illustrative rule here, the next candle must close above the hammer high and must not trade below the hammer low. If it does neither, the one-bar confirmation window expires. This is stricter than a close above the hammer close. It delays the decision by one full candle and can leave a larger distance to the invalidation level.

  • Wait for the hammer bar to close before measuring its final body and shadows. Its high, low, and close can change while it is open.
  • Record the confirmation on the next bar. Plotting that decision back on the hammer would hide when the information became available.
  • Before confirmation, a trade below the hammer low cancels this setup. After confirmation, the same break invalidates its low-holding premise.
  • A backtest must specify the actual order time, stop buffer, exit rule, costs, and slippage. Confirmation is not a fill price or a profit target.

Illustrative chart: confirmation and follow-through

This hypothetical sequence uses price units, not an identified security. The hammer opens at 99, closes at 100, reaches 100.2, and falls to 96: body 1, lower shadow 3, upper shadow 0.2, range 4.2. It passes the table thresholds. Assume the 50-period SMA is 104 at the hammer close; the short chart alone cannot calculate that average. The next close of 101.2 clears 100.2 while its low stays above 96. That confirms the stated setup; the following rise illustrates follow-through, not measured strategy performance.

Hypothetical hammer followed by confirmation and a higher close
96102.5109Decline 1: open 108, high 109, low 104, close 105Decline 1Decline 2: open 105, high 106, low 101, close 102Decline 2Hammer: open 99, high 100.2, low 96, close 100HammerConfirm: open 100, high 102, low 99.5, close 101.2ConfirmFollow-through: open 101.5, high 104.5, low 101, close 104Follow-through
OHLC values for Hypothetical hammer followed by confirmation and a higher close
BarOpenHighLowClose
Decline 1108109104105
Decline 2105106101102
Hammer99100.296100
Confirm10010299.5101.2
Follow-through101.5104.5101104

Hollow bodies close at or above the open. Filled bodies close below the open.

Illustrative data authored for this explanation. No trade execution, target, fees, or return is represented. The assumed SMA uses earlier bars not shown.

Illustrative chart: a confirmed hammer can still fail

Keep the same hammer and confirmation candle, then change only the following bar. Its low of 95.5 breaks the hammer low of 96, so the setup fails the stated invalidation rule despite having confirmed. A stop below 96 is an order instruction, not a promise to exit at that price; gaps and execution costs can increase the loss. Counting only hammers followed by rallies would exclude this outcome and bias a test.

Hypothetical confirmation followed by a break below the hammer low
95.5102.25109Decline 1: open 108, high 109, low 104, close 105Decline 1Decline 2: open 105, high 106, low 101, close 102Decline 2Hammer: open 99, high 100.2, low 96, close 100HammerConfirm: open 100, high 102, low 99.5, close 101.2ConfirmInvalidation: open 101, high 101.5, low 95.5, close 96.5Invalidation
OHLC values for Hypothetical confirmation followed by a break below the hammer low
BarOpenHighLowClose
Decline 1108109104105
Decline 2105106101102
Hammer99100.296100
Confirm10010299.5101.2
Invalidation101101.595.596.5

Hollow bodies close at or above the open. Filled bodies close below the open.

Illustrative failure branch using the same initial conditions. It is not a historical trade or an estimate of failure frequency.

Compare the rule with a traceable historical chart

The StockCharts source linked below includes a Nike (NKE) hammer at a mid-March support retest, followed by a sharp advance two days later. That example is useful precisely because its confirmation timing differs from the one-bar rule above. It supports examining later price action; it does not validate these particular thresholds or supply a success rate. Use the original chart for its annotations rather than assigning invented dates, fills, or returns to it.

Test a hammer rule without fitting it to one attractive chart

Fix the market, timeframe, trend filter, confirmation window, and exits before comparing results. Then count every qualifying hammer, including expired and failed setups. Separate red and green bodies only as a declared test. Report trade count, drawdown, costs, and results on a period excluded from parameter selection; a high win rate can still accompany large losses.

  • Pineify AI Coding Agent can help turn the explicit geometry and next-bar rules into Pine Script for review in TradingView.
  • Visual Editor includes a Hammer output in its Candlestick Patterns indicator. Check its preset definition before treating it as equivalent to the custom rules here.
  • Strategy Optimizer can compare exposed strategy input combinations. Use it to test sensitivity to thresholds, not to establish a universal hammer win rate.

Pineify next step

Turn the hammer definition into a testable script

Give Pineify the body and shadow thresholds, trend filter, confirmation window, invalidation rule, and exits. Review the generated Pine Script against both illustrative paths before evaluating historical results.

For educational purposes only, not investment advice. Chart scenarios are hypothetical and are not backtest or live trading results. Trading can result in losses; confirmation and historical results do not guarantee future performance.

Frequently Asked Questions