VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Indicators and signals

Reversal candlestick patterns: how to test if they predict turns

Hammers, engulfing patterns, stars and their relatives are the classic reversal candles. To find out whether they predict turning points, write them as exact rules, compare the move after them with the move after ordinary bars in the same trend, and confirm the result on data you did not use.

By · Published · updated · Editorial policy

Contents
  1. Which candlestick patterns signal a reversal?
  2. What counts as a reversal in a test?
  3. How do you measure forward returns after the pattern?
  4. How do you test out of sample and count false signals?
  5. Is there a best reversal candlestick pattern?
  6. Frequently asked questions
  7. References

Which candlestick patterns signal a reversal?

The common reversal candlestick patterns are the hammer, shooting star, engulfing patterns, piercing line, dark cloud cover, and morning and evening stars. To test them, write each pattern and the prior trend as exact rules, measure returns over fixed holding periods after the pattern, compare them with ordinary bars in the same trend, and repeat on later data.

A reversal candlestick pattern is a shape of one to three bars that traditionally appears at the end of a trend and is read as a sign that the trend may turn. The shape alone does not make it a reversal pattern. A hammer and a hanging man look the same. The trend before the bar decides which name it gets and which direction it points. These patterns come from candle shapes, while most other technical indicators come from a calculation.

PatternDirectionBarsShapeRequired prior trend
HammerBullish1Small body near the top of the range, lower shadow at least about twice the body, little or no upper shadowDown
Inverted hammerBullish1Small body near the bottom of the range, long upper shadowDown
Bullish engulfingBullish2A down bar, then an up bar whose body fully covers the first bodyDown
Piercing lineBullish2A down bar, then an up bar that opens below the first bar and closes above the middle of its bodyDown
Morning starBullish3A long down bar, a small-bodied bar below it, then an up bar that closes well into the first bodyDown
Shooting starBearish1Small body near the bottom of the range, long upper shadow, little or no lower shadowUp
Hanging manBearish1Same shape as the hammerUp
Bearish engulfingBearish2An up bar, then a down bar whose body fully covers the first bodyUp
Dark cloud coverBearish2An up bar, then a down bar that opens above the first bar and closes below the middle of its bodyUp
Evening starBearish3A long up bar, a small-bodied bar above it, then a down bar that closes well into the first bodyUp

A doji, a bar whose open and close are almost equal, is often listed too. On its own it shows indecision, not direction, so most tests treat it as part of a star pattern rather than as a signal. For the wider family of candles, including continuation shapes, see bullish and bearish candlestick patterns in tests.

Every reversal pattern is a shape plus a prior trend: after a fall, the hammer, bullish engulfing and morning star are bullish; after a rise, the shooting star, bearish engulfing and evening star are bearish Pattern = shape + prior trend Up bar Down bar Prior trend After a fall: bullish After a rise: bearish Hammer Engulfing Morning star Shooting star Engulfing Evening star
Bullish reversal patterns appear after a decline, bearish ones after a rise. The same shape in the wrong trend is a different pattern.

What counts as a reversal in a test?

A testable reversal needs two rules written before you look at any results: what the trend was before the pattern, and how far and how fast price must move afterwards. Without both, every chart can be read as a success, because you can always find a bounce somewhere.

A trend filter is a rule that decides whether the market was rising or falling before the pattern. A holding period is the fixed number of bars you measure after the pattern. Average true range (ATR) is the average size of a bar's full range, including any gap from the previous close. It is useful as a ruler, because a move of 50 points means something different in a quiet year and a wild one.

Write the test as a numbered recipe, for example:

  1. Trend filter. For bullish patterns, the close is below its 20-bar moving average and below the close of 10 bars ago. Reverse both conditions for bearish patterns.
  2. Pattern rule in numbers. For a hammer: lower shadow at least twice the body, upper shadow at most a quarter of the body, body in the top third of the range.
  3. Entry. The pattern is only known when its last bar closes, so the test enters at the next bar's open, not at that close.
  4. Holding periods. Choose them in advance, for example 5, 10 and 20 bars, and report all of them.
  5. Reversal threshold. Count a reversal only if price moves at least 1 ATR against the prior trend within the holding period.

Decide how to handle gaps. The classic piercing line, dark cloud cover and star patterns require a gap between bars. On futures that trade almost around the clock, a real gap between two intraday bars is rare. Gaps mostly appear at a session open or after a weekend. If you drop the gap condition, write that down, because you are now testing a different and more frequent pattern.

How do you measure forward returns after the pattern?

Measure the average move after the pattern, then subtract the average move after ordinary bars in the same trend; only the difference belongs to the pattern. A forward return is the price change from the entry to the close a fixed number of bars later, measured in the direction the pattern predicts.

The baseline is the set of all bars that pass the same trend filter but show no pattern. It matters because markets often bounce after a decline anyway. Praising a hammer because price rose afterwards is like praising a medicine because patients recovered from a cold, when most colds go away on their own. You need to know how fast patients recover without the medicine.

The one calculation that matters is:

Edge = Rpattern − Rbaseline

Here Rpattern is the average forward return after the pattern, and Rbaseline is the average forward return after the ordinary bars in the same trend, both over the same holding period and both in ATR units. Edge is what the pattern adds.

Hypothetical example

On ten years of daily bars of an index future, the trend filter finds 2,400 bars in a downtrend. 300 of them are hammers. The average 10-bar forward return after a hammer is +0.40 ATR. After the other downtrend bars it is +0.32 ATR. The edge is 0.08 ATR. With an ATR of 100 points, that is 8 points per trade before costs. If commission and slippage cost 3 points per round trip, 5 points remain. Also, 54% of hammer trades ended positive against 52% of baseline bars, so the hit rate barely differs either. This is a thin result that still has to pass an out-of-sample test.

Look at the size of wins and losses as well as the hit rate. A pattern can be right more often than the baseline and still lose money if its losers are larger. The win rate and expectancy calculator turns the win rate, average win and average loss into an expected result per trade, so you can compare it directly with your round-trip cost. That round-trip cost can come from the fees and slippage in the backtesting of AlphaPrime (Valynox), applied equally to every pattern variant you test.

Hypothetical forward returns in ATR over 1, 5, 10 and 20 bars: after the pattern 0.05 to 0.55, after ordinary bars in the same trend 0.04 to 0.50, so only the small gap between the lines is the pattern's edge Most of the move happens anyway Hypothetical, avg return in ATR After pattern Baseline, same trend Pattern's edge 1 5 10 20 bars The pattern adds only the gap. So: always test against a baseline.
Hypothetical forward returns: the line after the pattern rises, but the baseline rises almost as much. Only the shaded gap is the pattern's contribution.

How do you test out of sample and count false signals?

Freeze every rule on the earlier part of your data, then run it once on a later part you have not looked at; a pattern that keeps its edge there is worth more than any in-sample number. Out-of-sample data is history that played no part in choosing the rules, the thresholds or the holding period.

A false signal is a pattern after which price does not reach the reversal threshold, or keeps moving in the direction of the prior trend. Count them separately in both halves of the data. If false signals rise sharply out of sample, the rules were tuned to the first half.

CheckGood signBad sign
Edge in both halvesPositive in-sample and out-of-sample, similar sizeLarge in-sample, near zero or negative out-of-sample
Nearby settingsSimilar edge at 5, 10 and 20 bars and at slightly different shadow ratiosEdge appears at one holding period only
After costsEdge stays clearly larger than the round-trip costEdge is about the size of one tick of slippage
Spread of tradesResult comes from many trades across yearsA few large trades make most of the result
False signalsSimilar share in both halvesShare jumps in the later half

One split can still be lucky. Walk-forward analysis repeats the split across many windows, so the pattern has to hold up again and again. AlphaPrime includes walk-forward analysis and thresholds you set yourself in its strategy validation.

Count your variants too. Ten patterns, three trend filters, four holding periods and two shadow ratios already make 240 combinations. The best of 240 will look good even if none of them has a real edge. Sullivan, Timmermann and White applied a data-snooping test to a large set of technical trading rules and showed that the best rule must be judged against the whole search, not on its own. White's Reality Check and the work of Harvey and Liu follow the same idea. The deflated Sharpe ratio is one practical way to correct a result for the number of variants you tried.

A price history split in two: rules are defined and tuned on the earlier in-sample part, frozen at the split, then run once without changes on the later out-of-sample part Touch later data only once Price history, old to new Rules frozen here In-sample Out-of-sample Tune the rules Run once Change nothing after the line. So: write every rule down first.
Fix every rule on the earlier data, then run the test once on the later data without changing anything.

Is there a best reversal candlestick pattern?

No; a ranking of reversal patterns from one market, timeframe and period does not carry over to another. Lists of the "best reversal candlestick patterns" usually come from one data set and no baseline, so they show what happened once rather than what a pattern adds.

Results change for concrete reasons:

  • Market. An index future, a bond future and a metal future have different habits after a decline.
  • Timeframe. A hammer on a 5-minute bar reflects minutes of trading; on a daily bar it reflects a whole session.
  • Session. Bars that include a night session or a session open have different ranges and gaps from day-only bars.
  • Period. A pattern can work during one volatility regime and fade in the next.
  • Costs. Short holding periods leave a small move per trade, and costs take a large share of it.

What tends to hold up better is treating a pattern as one condition inside a full rule set: a trend filter, the pattern, an entry at the next bar, a defined exit and realistic costs. Then the whole rule set is tested, not the candle in isolation. If no version beats the baseline out of sample, that is a useful answer too. It saves you from trading a shape that only looks convincing on the chart.

What this means if you use AlphaPrime: treat a reversal idea as a research idea to turn into testable trading rules, with written entry and exit conditions, parameter ranges and costs. Then let validation with walk-forward analysis decide which candidates you keep for review.

Frequently asked questions

What is the most reliable reversal candlestick pattern?

No single pattern is reliable everywhere. Results depend on the market, the bar size, the session and the years you test. The only way to know is to compare the move after the pattern with the move after ordinary bars in the same trend, after costs and on data you did not use to set the rules.

Do reversal candlestick patterns work on futures?

They can be tested on futures like on any market, but a few details change. Futures that trade almost around the clock rarely show gaps between intraday bars, so patterns that require a gap become rare unless you relax the rule. Test the version you would actually trade and include commission and slippage.

How many pattern occurrences do I need for a test?

More is better, because a small sample lets a few lucky trades decide the result. Many traders want at least several dozen occurrences in each half of the data, and preferably more than a hundred. If a pattern is too rare, use a longer history, more markets or a less strict definition, and record that choice.

Should I wait for confirmation after a reversal candle?

Waiting for the next bar to close in the new direction is a different rule, so test it as a separate variant. Confirmation usually removes some false signals but enters at a worse price. Compare both versions against the same baseline and count both as variants you tried.

Which timeframe is best for candlestick reversal signals?

There is no general best timeframe. Shorter bars give more signals but smaller moves per trade, so costs weigh more heavily. Test each timeframe with the same rules and holding periods in bars, and keep only one that holds up out of sample.

References

  • Sullivan, R., Timmermann, A., & White, H. (1999). Data-Snooping, Technical Trading Rule Performance, and the Bootstrap. The Journal of Finance, 54(5), 1647–1691.
  • White, H. (2000). A Reality Check for Data Snooping. Econometrica, 68(5), 1097–1126.
  • Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.
  • Bailey, D. H., & López de Prado, M. (2014). The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality. The Journal of Portfolio Management, 40(5), 94–107.