Explanation of Hammer Candlestick Pattern
The Hammer candlestick pattern is a bullish reversal pattern that typically appears at the end of a downtrend. It signals that a stock may be nearing its bottom, suggesting that the sellers have exhausted their strength and buyers are starting to take control. The Hammer is characterized by a small real body at the top of the candlestick, with a long lower shadow at least twice the length of the body, indicating that the price initially dropped significantly during the session but recovered by the close, signaling potential upward momentum. Traders use this pattern to identify potential buying opportunities when the market has been declining.
Illustration of Hammer Candlestick Pattern
The Hammer candlestick pattern is illustrated below:

Key Pattern Features
- Small real body at the top of the candlestick.
- Long lower shadow at least twice the length of the body.
- Appears at the end of a downtrend.
- Signals potential bullish reversal.
Trading Psychology of the Hammer Pattern
The psychology behind the Hammer pattern reflects a change in market sentiment. Initially, sellers dominate, pushing the price down significantly during the session, but by the end of the session, buyers step in, pushing the price back up near the opening level. This shift from selling pressure to buying pressure suggests that the market may have reached a bottom, making it a strong indicator of a potential reversal. Traders see this as a signal that bearish momentum has weakened, and a bullish trend might be about to start.
Conventional Approach to Using the Hammer Candlestick Pattern
The Hammer pattern is generally more effective in markets that have been trending downward for a while. The theory suggests that it signals a potential reversal in a downtrend and works best in low to moderate volatility environments. In a high-volatility environment, false signals may be more frequent, so traders should proceed with caution. In trending markets, especially downtrends, the Hammer can act as a turning point, while in sideways markets, it may give off less reliable signals.
Risk Management Suggestions
Systematic traders often place stop-losses just below the low of the Hammer candlestick to limit risk if the reversal does not hold. Some traders might also set stop-losses based on volatility measures such as ATR (Average True Range), ensuring that they account for potential price fluctuations. As always, these levels should be backtested for reliability before live trading.
Backtest Performance
The following analysis shows the average profit per trade from purchasing selected ETFs on the open after the hammer pattern is formed assuming the trade is held for 5 trading days. The scenarios covered include:
- Primary Bull (Bear) Market: Close above (below) the 200 day simple moving average
- Short Term Strength (Weakness): Close above (below) the 20 bar simple moving average
- Low (High) Volatility: 20 bar Average True Range/Close is below (above) the 200 day moving average of the same
The purpose of this is to determine quickly whether the pattern holds any edge as an entry for these ETF’s. Obviously there are many ways to test this and I would suggest you test the pattern in your own backtesting.
All numbers presented represent average percent gain over the 5 days following the signal with no other exits. Darker green areas represent larger positive edge, darker red indicates potential areas edge on the short side.
Pattern Failure Conditions
The Hammer pattern may fail in conditions where there is no clear downtrend leading up to the appearance of the pattern, as the reversal signal may not be as strong. It can also produce false signals during periods of high volatility or if there are no significant fundamental changes to support the reversal, causing the price to continue falling despite the appearance of the Hammer.
Systematic Trading Application
The Hammer can be used systematically as an entry signal in trend-following or reversal systems. Traders could establish a rule to enter a long position once a Hammer forms after a prolonged downtrend and is confirmed by the next candlestick closing above the Hammer’s high. Exit rules could be based on specific profit targets or moving averages. However, as with any candlestick pattern, systematic traders should backtest this approach before live trading to ensure its robustness and profitability.
Amibroker Code for Hammer Candlestick Pattern
// Hammer Candlestick Pattern AFL Code
Hammer = ((Close > Open) AND ((Open – Low) >= 2 * (Close – Open)) AND ((High – Close) <= (Close – Open)));
Links to articles about other Candlestick Patterns
- Doji
- Hammer
- Inverted Hammer
- Bullish Engulfing
- Bearish Engulfing
- Morning Star
- Evening Star
- Shooting Star
- Hanging Man
- Piercing Pattern
- Dark Cloud Cover
- Three White Soldiers
- Three Black Crows
- Dragonfly Doji
- Gravestone Doji
- Spinning Top
- Marubozu
- Tweezer Top
- Tweezer Bottom
- Bullish Harami
- Bearish Harami
- Rising Three Methods
- Falling Three Methods
- Bullish Abandoned Baby
- Bearish Abandoned Baby
- Bullish Kicker
- Bearish Kicker
- Three Inside Up
- Three Inside Down
- Upside Gap Two Crows
- Mat Hold
- Upside Tasuki Gap
- Downside Tasuki Gap