WhitmanTrading

Candlestick Patterns: Exact Rules for 7 Names, Counted on 33 Years of SPY

Candlestick patterns are names given to particular bar shapes, defined by how large the body is relative to the range and where the wicks sit. They describe a continuous space of shapes, so bars shade from one named pattern into another rather than belonging to distinct categories.

Candlestick Patterns: Exact Rules for 7 Names, Counted on 33 Years of SPY — illustrated on a chart Watch: Candlestick Patterns: Beginner to Advanced

Covered on this page: TradingView.

Candlestick patterns are names for bar shapes: a doji, a hammer, a shooting star, an engulfing bar. Each one is a rule about how big the body is compared with the whole range, and where the wicks sit.

Below are the exact rules for seven of them, a count of every one on 8,497 SPY daily sessions, and what the five sessions after each one did compared with an ordinary day.

Most guides list dozens of names with a drawing beside each. That teaches recognition, but it skips the two questions a beginner should ask first: how strict is the rule, and how often does the shape turn up anyway? Both have answers you can measure.

How it works: the rules, written as numbers

Every single-candle name comes from three measurements on one candlestick: the body (open to close), the upper wick (top of the body to the high) and the lower wick (bottom of the body to the low), each read as a share of the full high-to-low range. These are the rules used for every count on this page:

Name Rule on the bar Extra condition
Doji Body no more than 10% of the range None
Hammer Lower wick at least twice the body; upper wick no more than 10% of the range Close below the close five sessions earlier
Hanging man Same shape as the hammer Close above the close five sessions earlier
Inverted hammer Upper wick at least twice the body; lower wick no more than 10% of the range Close below the close five sessions earlier
Shooting star Same shape as the inverted hammer Close above the close five sessions earlier
Bullish engulfing Green body that opens at or below the prior red close and closes at or above the prior red open, with a larger body Two bars
Bearish engulfing The mirror: red body covering the prior green body Two bars

The four wick shapes also need a body bigger than zero: a bar that opens and closes at exactly the same price counts only as a doji.

Two things stand out once the rules are written down. The hammer and the hanging man are one shape, and so are the inverted hammer and the shooting star. The only difference is which way price went over the previous week.

And nothing in the table is a law. Other books use a 5% doji, a three-times wick, or a fresh high for the hanging man (the hanging man page uses that stricter version and finds far fewer). Change a number and the count changes with it.

How often each one printed on SPY

Sample: SPY daily bars from Yahoo Finance, 29 Jan 1993 to 30 Oct 2026, 8,497 sessions (33.75 years), raw open, high, low and close. No session had a zero range.

One caution about the early years: 19.1% of Yahoo’s 1993-1999 bars show no upper wick at all, against 2.2% since 2000, which makes the 10% upper-wick rule easier to pass. That helps explain why 37 of the 111 hammers come from those first seven years.

Pattern Sessions A year Closed higher 5 sessions later Median 5-session change
All sessions (base rate) 8,492 with five sessions after 4,909 (57.81%) +0.34%
Doji (10%) 856 25.36 481 (56.19%) +0.26%
Hammer 111 3.29 73 (65.77%) +0.63%
Hanging man 193 5.72 114 (59.07%) +0.39%
Inverted hammer 63 1.87 40 (63.49%) +0.85%
Shooting star 68 2.01 36 (52.94%) +0.13%
Bullish engulfing 287 8.50 147 (51.22%) +0.08%
Bearish engulfing 355 10.52 213 (60.00%) +0.41%

A doji at the 10% rule printed about once every ten sessions (one in 9.93). Put all seven names together and 1,857 sessions carried at least one, which is 21.85% of the whole history. Anyone scanning a daily SPY chart for named shapes will find one most weeks without the market doing anything special.

The threshold is the count

The doji is the cleanest test of how much the rule matters, because it has only one number in it.

Tripling the cut-off almost tripled the count, and there is no gap in the data where “doji” naturally stops. Bodies run smoothly from tiny to large, so the line is a convention.

The same goes for wicks: of the 304 hammer-shaped bars (111 hammers plus 193 hanging men), 42 also passed the 10% doji rule, so they belong to two named groups at once.

A worked example: SPY on 18 September 2026

This is a real bar, and it is also the hammer marked on the chart below.

The prices. SPY opened at $761.31, traded up to $762.00, down to $757.97, and closed at $761.69.

The measurements. The range was $4.03. The body was $0.38, which is 9.43% of the range. The lower wick ran from $761.31 down to $757.97, which is $3.34 or 82.88% of the range. The upper wick was $0.31, or 7.69%.

The rule check. The lower wick ($3.34) is far more than twice the body (2 × $0.38 = $0.76). The upper wick (7.69%) is under the 10% ceiling.

The close was 0.34% below the close five sessions earlier ($764.29 on 11 Sep), so the trend condition says hammer. And because the body is under 10% of the range, the same bar is also a doji. One candle, two names, both correct.

The near miss. The day before, 17 Sep, looked almost the same: a long lower wick (73.13% of the range) and a small body (15.24%). It failed the hammer rule because its upper wick was 11.63% of the range, 1.63 percentage points over the line, and it missed the doji rule as well.

Had it passed, it would have been a hanging man, since SPY was 0.63% higher than five sessions before.

What happened next. Five sessions after 18 Sep, SPY closed at $771.35 on 25 Sep, 1.27% higher. That is one case. The table above is what 111 hammers did, and the next section says how much weight it can carry.

The original data

SPY daily candles from 1 September to 30 October 2026, with five doji at the 10% rule, two more at the 15% rule, one hammer on 18 September, one shooting star on 6 October, a bearish engulfing bar on 16 October and a bullish engulfing bar on 20 October marked.
SPY daily candles, 1 Sep to 30 Oct 2026 (43 sessions), with every session the page's rules named. Source: Yahoo Finance, SPY daily bars (m107aa-spy-candlestick-patterns-daily-1993-2026.csv).

Ten of the 43 sessions in those two months picked up a name, counting the 15% doji. Across all of 2026 to 30 Oct, 48 of 209 sessions did. Nobody planted those shapes; they are what ordinary trading days look like when you measure them.

The shooting star on 6 Oct had an upper wick of 69.13% of its range and came after a 1.95% rise over five sessions; SPY closed 0.14% lower five sessions later.

The bearish engulfing bar on 16 Oct and the bullish one on 20 Oct sat only two sessions apart, so the names flipped direction almost at once.

The comparison that matters is with the base rate. SPY rose over most of these 33 years, so 57.81% of all sessions closed higher five sessions later. A pattern only says something if its own figure sits clearly away from that number.

Horizontal bars: share of SPY sessions that closed higher five sessions later, 1993 to 2026. All sessions 57.81%, hammer 65.77%, inverted hammer 63.49%, bearish engulfing 60.00%, hanging man 59.07%, doji 56.19%, shooting star 52.94%, bullish engulfing 51.22%.
Share of SPY daily sessions that closed higher five sessions later, by pattern, with the share for all sessions, 29 Jan 1993 to 30 Oct 2026. Source: Yahoo Finance, SPY daily bars (m107aa-spy-candlestick-patterns-daily-1993-2026.csv).

How far from chance? One way to judge a gap is to count it in standard errors: how far a group of that size would usually wander from 57.81% by luck alone. The hammer sat 1.70 standard errors above the base rate.

The bullish engulfing bar sat 2.26 below it, the only pattern past two, and it was lower than an ordinary day, the opposite of what its name suggests.

Seven patterns were tested here, and the five-day windows overlap, which makes each check too generous. One result past two out of seven is about what chance alone produces, so this data shows no pattern whose five-session outcome stands apart from an ordinary SPY day. Small groups like the 63 inverted hammers can swing several points either way.

Every session, with its measurements, its labels and the close five sessions later, is in the SPY candlestick patterns file.

What actually makes one matter

Location. A hammer at a level price has already reacted to twice is a different object from an identical hammer in the middle of a range. The counts above ignore location entirely, on purpose: they measure the shape alone, and the shape alone did not separate itself from an ordinary day.

The practical order is level first, bar second. Mark the level from market structure before you look at any candles. Wait for price to reach it.

Then read the bar: a long wick pushing away from the level says price was rejected at a place you already cared about. Name it if you like. The name adds nothing you did not already see.

The invalidation is the far end of the wick. If price closes past the low of that hammer, the rejection did not hold. That is a real price the bar gave you, which is more useful than its label.

The names carry no direction

Most patterns come in a bullish and a bearish version of the same shape, and the table of rules shows how: the bar is identical, and the name flips with the five sessions before it.

The data agrees that the label is doing little work. The hammer and the hanging man, one shape with opposite names, both closed higher five sessions later more often than not (65.77% and 59.07%), and so did the bearish engulfing bar (60.00%). On a market that rose most weeks, a “bearish” name did not change that.

Real SPY candles showed 728 gap days since 1996 and heikin-ashi bars showed none, because the construction cannot draw one, according to candlesticks vs heikin-ashi.

When it fails

The textbook shape does nothing

A clean hammer can be followed by three lower closes. Nothing was wrong with the identification. The shape described one session, and the next sessions were not obliged to agree. Of the 111 hammers counted here, 38 closed lower five sessions later.

The definitions are elastic

Change the doji cut-off from 5% to 15% and the count roughly triples. Two traders using two books can look at the same bar and disagree, and both are reading their rule correctly.

You went looking for them

About one session in five carried a name. Scan any chart for shapes and you will keep finding them, then find a reason to trade each one.

You saw it after the turn

Every turn has a candle at the bottom of it. So does every pause that kept falling. At the moment the bar closes those look the same, which is why the level, not the shape, has to carry the decision.

Questions people ask

Do candlestick patterns work?

On SPY daily bars from 1993 to 2026, none of seven common patterns produced a five-session result that stood apart from an ordinary day once chance was allowed for. They are useful as a short way to describe what a session did, not as signals on their own.

What is the most reliable candlestick pattern?

No pattern in this test was reliably different from the base rate. The hammer had the highest share of higher closes five sessions later (65.77% of 111), but that gap is within what luck produces in a test of seven patterns.

How many candlestick patterns are there?

Books list dozens, and the number depends on the author. They all come from the same few measurements: body size, the two wicks, and how the bar sits next to the one before. This page counts seven of the most common.

What timeframe are candlestick patterns best on?

The counts here are daily bars only, so they say nothing about intraday charts. On any timeframe the same two facts apply: the rule decides how many you see, and the outcome has to be compared with an ordinary bar on that same chart.

Candlesticks is the page underneath this one: what the four prices are, and what a body and a wick actually say.

Price action is reading bars without any of these names, which is mostly what experienced traders do.

Support and resistance is the thing that turns a shape into information. The single-name pages go deeper on one shape each: hammer, inverted hammer, bullish engulfing, bearish engulfing, dragonfly doji, gravestone doji, harami and the three-candle morning star.

One of the simplest patterns is a single bar that fits inside the one before it, and the inside bar page explains why that pause predicts no direction on its own.

The practical check

Knowing the names is fine; trading the names is not. What matters is a bar with a long wick at a level you already cared about, and whether it is called a hammer, a pin bar or a dragonfly doji should not change the decision. Treat the names as a checklist and you will find four setups a day in markets that are doing nothing.

— Michael Whitman

This page is educational, not financial advice. Test every idea on your own charts before risking money. Some links on this page earn a commission if you buy through them. It costs you nothing and it does not decide what appears here or in what order — how these pages are made is set out in our methodology.