Browse the library

Candlesticks · Two-candle patterns

Doji star candlestick: a gapping doji after a long candle

What a bullish or bearish doji star is, how TA-Lib detects the body gap, why it is only two-thirds of a star, and how 689 real doji stars played out.

On this page
  1. The two candles
  2. The exact rules Finabase uses
  3. The psychology: momentum meets a wall
  4. Confirmation is the third candle
  5. Two doji stars on real charts
  6. What the data says
  7. Doji star versus related patterns
  8. An educational outline for a doji star
  9. How Finabase shows doji stars
  10. Frequently asked questions
  11. Summary

In candlestick terms a star is a small-bodied candle whose body gaps away from the long body before it. When that small candle is a doji, with open and close almost equal, the two-candle combination is a doji star. After an advance, a long green candle followed by a doji gapping higher is a bearish doji star. After a decline, a long red candle followed by a doji gapping lower is a bullish doji star.

The doji star is best understood as an unfinished pattern. It is the first two candles of the famous three-candle stars: the evening doji star at tops and the morning doji star at bottoms. Those need a third candle that turns sharply in the new direction. The doji star on its own is the moment just before that turn, or before the turn fails to arrive.

Here you will find what the two candles look like, the precise conditions Finabase uses, why the third candle matters so much, two real cases, and what happened after 689 doji stars on 60 large US stocks and ETFs over two years.

The two candles

Bearish doji star after an advance (illustration, prices not real) Long green body Doji gaps above the body
A bearish doji star after an advance. The shaded pair is the long green candle and the doji gapping above its body. Prices are illustrative.

The bearish version starts with momentum. A rally culminates in a long green candle, and the next session opens above that candle's close. Then nothing happens: the market drifts up and down and closes where it opened. On the chart, a cross floats above the long body.

Bullish doji star after a decline (illustration, prices not real) Long red body Doji gaps below the body
A bullish doji star after a decline: the doji gaps below the long red body. Prices are illustrative.

The bullish version runs the other way. A long red candle extends a decline, and the following session opens below its close and finishes flat. The doji's shadows can be long or short. They may even reach back into the long candle's range. What matters is that the doji's open and close both sit beyond the long candle's body.

The exact rules Finabase uses

Finabase uses TA-Lib's CDLDOJISTAR for its chart markers, scanner and gauge:

Condition TA-Lib default
First candle long Real body longer than the average real body of the previous 10 candles
Second candle a doji Real body no more than 10% of the average high–low range of the previous 10 candles
Gap after green Bottom of the doji's body above the top of the green body (the green close)
Gap after red Top of the doji's body below the bottom of the red body (the red close)
Shadows Not tested; they may overlap the first candle
Third candle Not tested
Prior trend Not tested
Output −100 after a green first candle, +100 after a red first candle

What is looser than the textbook

The gap is only between bodies. A true window, where the doji's whole range clears the first candle's range, is not required. Many of the doji stars TA-Lib reports on daily charts are body gaps only, with the doji's shadow reaching back into the previous range.

The trend is assumed, not checked. The direction is the opposite of the first candle's color. A long green candle in a downtrend followed by a doji gapping higher still counts as bearish. In our sample that was the minority: about 71% of bullish and 73% of bearish doji stars came after a ten-session move in the other direction.

There is no third candle. This is the important one. TA-Lib reports the doji star as soon as the doji closes. The full reversal patterns, the morning doji star and evening doji star, are separate TA-Lib functions that need the third candle. In Finabase those two belong to a group of seven patterns that never fire because of a penetration setting of 10 inherited from the legacy app, so the two-candle doji star is the only form of this idea the app reports.

The psychology: momentum meets a wall

In the bearish case, the long green candle shows buyers in control. The gap open the next morning shows them still eager, willing to pay above yesterday's close. Then the session fails to make progress. Buyers keep buying, sellers keep matching them, and the day ends unchanged. The trend did not reverse. It stopped.

That stop matters because trends need continual new demand to keep going. A doji at the far end of a gap says new demand and new supply met in balance at a higher price than ever. What happens next decides everything. If the following session gaps down and closes deep into the long green body, the sequence becomes an evening doji star, one of the stronger bearish signals in the candlestick literature. If the following session simply resumes upward, the doji was a one-day breather.

Confirmation is the third candle

For a doji star more than most patterns, confirmation is part of the definition:

  • The star-completing candle. A long candle in the reversal direction that closes well into the first candle's body. That turns the pattern into a morning or evening doji star.
  • A close beyond the doji's range, the simpler rule used in our study: for a bearish doji star, a close below the doji's low; for a bullish one, a close above its high.
  • A gap away from the doji. If the doji is left isolated, with gaps on both sides, it becomes an abandoned baby, which traditional sources rank as rarer and stronger.
  • Overextension. A doji star after a stretched move, with the Relative Strength Index (RSI): how to read and use it at an extreme, has more room to reverse than one after a modest move.

Two doji stars on real charts

IBM daily — a bearish doji star at the July 2026 high $200 $250 $300 Bearish doji star 2026-07-07 −31.2% after 10 sessions Jun Jul
IBM: every doji star TA-Lib detected in the window is shaded. The labelled one, a bearish doji star on 2026-07-07, came after a 21% ten-session rise.

IBM, July 7, 2026 (bearish, worked, without confirmation). IBM had climbed 21.4% in ten sessions. On July 6 it closed at $299.52 after opening at $288.35, a long green body. On July 7 it opened at $305.66, above that close, and finished at $306.13: a 47-cent body on an $11.31 range, a doji whose body sat entirely above the green one. The next session was a small green candle closing at $302.05, still above the doji's $300.49 low, so neither the close-below-the-low rule nor an evening star completed. Then the stock collapsed: five sessions after the doji it was 29.1% lower, and ten sessions after it was down 31.2%, having traded as low as $204.44. The doji marked the top, but nothing in the pattern predicted the size of what followed, and a trader waiting for the usual confirmation would have been left out of the move.

Tesla (TSLA) daily — a bullish doji star in March 2025 that the decline ignored $300 $400 Bullish doji star 2025-03-04 −17.2% after 10 sessions Feb Mar
Tesla (TSLA): a bullish doji star on 2025-03-04 after a 23% ten-session decline, followed by a further 17.2% fall within ten sessions.

Tesla, March 4, 2025 (bullish, failed). Tesla had fallen 23.2% in ten sessions. On March 3 it opened at $300.34 and closed at $284.65, a long red candle. On March 4 it opened at $270.93, well below that close, swung between $261.84 and $284.35, and closed at $272.04. TA-Lib reported a bullish doji star. The next session rose to $279.10 but closed below the doji's $284.35 high, so it neither confirmed the pattern nor completed a morning star. Ten sessions later Tesla was 17.2% lower. Exhaustion in a decline can last for a long time.

What the data says

We ran CDLDOJISTAR on 29,760 daily bars, 60 large US stocks and ETFs from October 30, 2024 to October 29, 2026, and compared each signal's next five sessions with every day in the sample.

Group Cases Went its way after 5 sessions Any-day baseline Average 5-session return Average 10-session return
Bullish doji star 308 48.2% 53.1% −0.19% +0.32%
Bullish, confirmed (from confirmation) 96 49.0% 53.1% −0.60%
Bearish doji star 381 43.7% 46.7% +0.83% +1.41%
Bearish, confirmed (from confirmation) 97 44.3% 46.7% +0.50%

Returns are price changes, so the positive averages after bearish doji stars mean the stocks kept rising on average.

Both directions underperformed the baseline. Bullish doji stars were higher a week later less often than a random day, and bearish ones fell less often than a random day. Bearish doji stars were followed by an average gain of 0.83% over five sessions and 1.41% over ten: in this sample a doji after a gap higher more often marked a pause in an advance than its end.

Context did not help. The great majority of these signals formed in exactly the setting textbooks describe, after a ten-session move against the pattern. The results still matched or trailed the baseline.

The simple confirmation rule did not help either. A close beyond the doji's range left both sides near or below their baselines. Our test did not measure the stricter three-candle confirmation that defines the morning and evening doji stars.

Pattern Candles Where the doji sits Third candle needed
Doji star 2 Body gapped beyond the long body No
Harami cross: a doji inside a long candle, rules and results 2 Body inside the long body No
Morning / evening doji star 3 Gapped, then a strong opposite candle Yes
Abandoned baby 3 Gapped on both sides, shadows included Yes
Engulfing candlestick pattern: bullish and bearish rules and data 2 No doji; a large opposite body No

The doji star and the harami cross are a useful pair to compare. Both show a doji after a long candle. In the harami cross the doji retreats inside the prior body. In the doji star it pushes beyond it. The star shows the trend extending before it stalls, the cross shows it stalling immediately.

An educational outline for a doji star

How practitioners frame the pattern. It is not a recommendation.

  1. Treat the doji star as a watch signal, not an entry.
  2. Wait for the third candle. A strong candle in the reversal direction that closes well into the first candle's body.
  3. Place invalidation beyond the doji's extreme. For a bearish setup, above the doji's high. A new high after the doji means the advance resumed.
  4. Size from that distance, which is often generous because doji ranges can be wide.

How Finabase shows doji stars

  • Chart. Add Doji Star to a chart (the IBM chart link has it on). Each doji that completes the two-candle pattern is marked, bullish and bearish alike.
  • Scanner. The scanner places a detection by its sign: bullish doji stars after a red candle go on the Bullish list, and bearish ones after a green candle on the Bearish list.
  • Signals gauge. On a symbol's Signals tab, for example IBM, the doji star's latest non-zero output in the last eight bars votes Buy or Sell in the Candlestick gauge. The three-candle morning and evening doji stars always vote Neutral there, because of their penetration setting.

Frequently asked questions

Is a doji star bullish or bearish?

It depends on the first candle. After a long red candle in a decline it is a bullish doji star. After a long green candle in an advance it is bearish. TA-Lib sets the direction from the first candle's color alone.

What is the difference between a doji star and an evening doji star?

The evening doji star adds a third candle: a strong red candle closing well into the first green body. The doji star stops after the doji, so it is a warning rather than a completed reversal.

Does the doji need a true gap?

Not in TA-Lib. Only the doji's real body must lie beyond the first candle's real body. The shadows may overlap the previous candle.

How reliable is the doji star?

In our two-year sample, not reliable. Neither direction beat its baseline, and bearish doji stars were followed by gains on average.

Summary

The doji star is a long candle followed by a doji whose body gaps beyond it: a trend that extends once more and then stalls in perfect balance. TA-Lib detects it on the doji with a body-gap test, no trend check and no third candle, which makes it the opening of a morning or evening doji star rather than the full pattern. On 689 cases from 60 large US names, neither direction showed an edge, and bearish doji stars more often preceded further gains. Use it as a signal to pay attention, and let the third session decide what the stall meant.

Sources and further reading

  1. Steve Nison, Japanese Candlestick Charting Techniques (New York Institute of Finance, 1991)
  2. Thomas N. Bulkowski, Encyclopedia of Candlestick Charts (Wiley, 2008)
  3. TA-Lib source code — CDLDOJISTAR and the default candle settings
  4. Finabase chart data — daily bars for 60 US stocks and ETFs, 2024-10-30 to 2026-10-29; patterns detected with TA-Lib CDLDOJISTAR