Candlesticks · Single-candle patterns
Doji candlestick: meaning, exact rules and what the data shows
What a doji candle tells you, the exact body test Finabase uses, why it fires on about one day in seven, and what 4,119 real dojis did next.
On this page
- What a doji looks like
- The exact rules Finabase uses
- Reading the doji: what the stalemate means
- Confirmation: let the next session vote
- Two real dojis, read in context
- What the data says
- Doji versus its relatives
- An educational outline for trading around a doji
- How Finabase shows dojis
- Frequently asked questions
- Summary
A doji is a session that ends almost exactly where it began. Buyers and sellers pushed the price around, sometimes a long way, and by the close neither side had gained any ground. On a chart the result is a cross, a plus sign or a flat line: a candle with practically no real body.
The doji is the root of a whole family of candles. The Long-legged doji: rules, the TA-Lib quirk and real results, the Rickshaw man candlestick: the centered doji, rules and results, the Dragonfly doji: meaning, TA-Lib rules and a 380-case test, the Gravestone doji: meaning, rules and why Finabase files it bullish and the Takuri line candlestick: definition, TA-Lib test and results are all dojis with a particular arrangement of shadows. Learn the parent first and the rest become variations on one idea.
This page explains what the doji records, the one-line rule Finabase's detector applies, why that rule flags so many candles, what happened after every doji on 60 large US stocks and ETFs over two years, and a quirk in how the app files this neutral candle.
What a doji looks like
A candlestick has a real body, the box between the open and the close, and two shadows, the thin lines that reach to the session's high and low. In most candles the body tells you who won the day. In a doji the body has shrunk to a line, so the shadows are the only part left to read.
The shape on its own is neutral. Classical candlestick teaching treats a doji as a warning that the prevailing move has lost momentum, and the warning is louder in some places than others:
- After a long or steep advance, a doji says buyers who were in charge could not push the close any higher. Nison regarded this as the more significant case, because a rally needs fresh buying to continue and a doji shows none arrived.
- After a decline, the same candle says sellers have stopped making progress. Most practitioners want more evidence here, since markets can drift lower without urgent selling.
- In a sideways range, dojis are routine. Quiet, balanced sessions are what a range is made of.
The two illustrations above contain the same candle. Only the trend in front of it differs, and that is the whole interpretive problem with the doji: the meaning sits in the context, not in the candle.
The exact rules Finabase uses
Finabase draws its doji markers with TA-Lib's CDLDOJI function, run on daily bars. The
whole test is one comparison:
| Condition in TA-Lib | Default setting |
|---|---|
| Doji body | Real body ≤ 10% of the average high–low range of the previous 10 candles |
| Shadows | Not tested at all |
| Trend before it | Not tested at all |
| Output | +100 on every match. There is no −100 doji |
Three consequences follow from that table.
The yardstick is the recent past, not the candle itself. A candle is a doji if its body is tiny compared with the typical range of the last ten sessions. On a quiet day after a volatile fortnight, a candle whose body fills a third of its own small range can still pass. On a wild day after a calm stretch, a body that looks razor-thin on the chart can fail because the ten-day average range is small.
Nothing about the shadows is checked. A cross with long arms, a flat dash and a lopsided T all pass, as long as the body is small. The more specific members of the family add shadow conditions on top of this one.
The output is always positive. TA-Lib's own source comments say a doji is neither bullish nor bearish when considered alone, yet the function reports +100 for every match. Software that sorts patterns by the sign of that number will treat every doji as bullish. Finabase does exactly that, as explained below.
Reading the doji: what the stalemate means
Think of a session as a negotiation. The open is the opening offer and the close is the settled price. When the settled price is back where the bidding started, the session's travel, however far, produced no agreement on a new value.
That matters most when the previous days were one-sided. A run of strong closes means one side has been winning every negotiation. A doji is the first session where it didn't. The losing side may simply have paused, or the winning side may be running out of participants willing to pay up. One candle cannot tell those stories apart, which is why the doji is best treated as a question rather than an answer.
Two refinements help:
- Range relative to recent candles. A doji with a wide range was a contested session. A doji with a tiny range was a quiet one. TA-Lib's rule accepts both.
- Volume. A doji on heavy volume says many shares changed hands with no net progress, which suggests genuine disagreement. A light-volume doji, such as one on a half-day session, often means very little.
Confirmation: let the next session vote
Because the doji itself has no direction, the confirmation decides which way to lean:
- After an advance, a close below the doji's low on the next session is the classic bearish follow-through.
- After a decline, a close above the doji's high is the bullish version.
- A close back inside the doji's range means the stalemate is continuing.
Confirmation filters out the many dojis that are just a pause. It cannot rescue a doji that formed in the middle of nowhere, and it costs some of the move, because you act a session later and at a worse price.
Two real dojis, read in context
Broadcom, December 17, 2024. AVGO had gained 42.9% in ten sessions, much of it in a single surge after its quarterly report. On December 17 it opened at $240.65, traded between $233.80 and $242.47, and closed at $240.23, a body of 42 cents on a $8.67 range, with volume about twice its 20-day average. That is the textbook warning: a big, busy session that went nowhere at the top of a steep run. The next session closed at $223.62, below the doji's low and 6.9% lower, which is the bearish confirmation. Ten sessions after the doji AVGO was 3.4% below the doji's close. The warning was right about momentum, though the stock held most of its earlier gain.
Tesla, March 4, 2025. TSLA had dropped 23.2% in ten sessions. The March 4 candle opened at $270.93 and closed at $272.04, with shadows reaching $284.35 and $261.84. A reader hoping for a bottom might have seen indecision after a slide, and Finabase's scanner would have listed the stock under Bullish. The next session closed at $279.10, inside the doji's range, so there was no confirmation. Five sessions later TSLA was 15.2% lower and ten sessions later 17.2% lower. The doji marked a pause in a decline, not its end.
What the data says
We ran CDLDOJI over daily bars from October 30, 2024 to October 29, 2026 for 60 large
US stocks and ETFs (29,760 bars), then checked where each stock closed five and ten
sessions after every doji. Of the 4,119 dojis, 4,012 had ten sessions of data after them.
Because a doji has no direction of its own, the table shows the share that closed
higher, split by what came before.
| Group | Cases | Higher after 5 sessions | Avg 5-session return | Avg 10-session return |
|---|---|---|---|---|
| Any trading day (the baseline) | 29,760 | 53.1% | +0.35% | +0.66% |
| Every doji | 4,012 | 53.0% | +0.43% | +0.65% |
| Doji after a 10-session decline | 1,902 | 52.9% | +0.44% | — |
| Doji after a 10-session advance | 2,158 | 53.2% | +0.39% | — |
| Next close above the doji's high, from that close | 1,248 | 53.8% | +0.42% | — |
The two context rows are our own split of the same data: 46.8% of measured dojis followed a ten-session decline.
The reading is short: the doji, as TA-Lib defines it, carried no measurable edge in either direction. Dojis after an advance were not more likely to be followed by weakness; about 47% of them were lower five sessions later, the same as any day. Dojis after a decline were not more likely to bounce. Requiring a close above the doji's high nudged the hit rate up by less than a percentage point.
That is consistent with the frequency problem. A condition met on one day in seven describes ordinary market behaviour, so its average outcome is the market's average outcome. Rare, extreme dojis, like the Broadcom example, may behave differently, but they are drowned out in a sample of four thousand.
Doji versus its relatives
Every candle in this table passes the basic doji body test or comes close to it. The shadows are what separate them.
| Pattern | Shadows | Count in our sample | Usual reading |
|---|---|---|---|
| Doji | Any | 4,119 | Stalemate; context decides |
| Long-legged doji | At least one shadow longer than the body | 4,119 | Wide disagreement |
| Rickshaw man | Both shadows long, body near the middle | 3,133 | Balanced, contested session |
| Dragonfly doji | Long lower shadow, close at the high | 380 | Sellers rejected |
| Takuri | Very long lower shadow, close at the high | 376 | Sellers rejected, more strongly |
| Gravestone doji | Long upper shadow, close at the low | 351 | Buyers rejected |
| Spinning top | Small (not tiny) body, both shadows longer | 6,572 | Indecision with some body |
Two facts in that table surprise most readers. The long-legged doji count is identical to the doji count, which the Long-legged doji: rules, the TA-Lib quirk and real results page explains from TA-Lib's source. And 3,793 of the 4,119 dojis also passed the Spinning top candlestick: meaning, color quirk and real results test, because a tiny body is also a small one.
An educational outline for trading around a doji
This is a framework for study, not a recommendation to trade.
- Locate it. Measure the move before the doji. A doji after a 15% run in ten sessions is a different event from a doji in a flat month.
- Weigh it. Compare the doji's range and volume with the last ten sessions. A wide, busy doji is more meaningful than a narrow, quiet one.
- Wait for the vote. Act only if the next session closes beyond the doji's high or low in the direction that opposes the prior trend.
- Set the invalidation at the far end. After an advance, the doji's high is the level that should not be exceeded; after a decline, its low.
How Finabase shows dojis
- On charts. Add the Doji study to a symbol's chart (the AAPL link above opens one)
and Finabase marks every candle
CDLDOJIflags. Expect a lot of marks: on most stocks you will see several a month. - In the Scanner. The candlestick scanner sorts each detection by the sign of TA-Lib's output, and a doji is always +100. So every doji appears in the Bullish list (S&P 500 dojis) and none appears under Bearish, even one at the top of a rally. Read the listing as "a doji formed here", then judge the direction from the chart.
- In the Signals-tab gauge. On a symbol's Signals tab, each of the 61 candlestick patterns casts a vote from its most recent detection within the last eight bars: Buy if positive, Sell if negative, Neutral if none. A doji therefore always votes Buy. In our sample the doji vote was Buy on 68.9% of stock-days, and the long-legged doji, which fires on exactly the same candles, cast a second Buy vote on each of them. With no other pattern active, two Buy votes produce a score of 2 ÷ (2 + 0 + 2) = 0.5, which the gauge reports as Buy. Keep that in mind before reading a Buy verdict as anything more than "small-bodied candles happened recently".
Frequently asked questions
Is a doji bullish or bearish?
Neither on its own. A doji shows that the open and close were nearly the same, which means neither side won the session. Its implication comes from the trend before it and the session after it. Finabase lists it under Bullish only because TA-Lib reports every doji as +100.
How small does the body have to be?
In Finabase, at most 10% of the average high–low range of the previous ten candles. Many traders use a stricter eye test, such as a body no more than about 5% of the candle's own range. There is no single official threshold.
Is a doji at the top of a rally a sell signal?
It is a warning that the rally lost momentum for a session. In our sample, dojis after a ten-session advance were lower five sessions later about 47% of the time, essentially the same as any day. A close below the doji's low adds information; the doji alone adds little.
Why do I see so many dojis on Finabase charts?
Because the default rule compares the body with recent ranges and does not test the shadows, it flagged 13.8% of all daily bars in our study. Focus on the dojis that form after a clear move and on a wide range.
Summary
The doji records a session in which the open and close met again, a stalemate whose meaning depends entirely on what came before and what comes next. TA-Lib's definition is broad enough to catch about one day in seven, and across 4,012 measured cases dojis were followed by ordinary, baseline outcomes whether they came after a rally or a decline. Finabase marks them faithfully but files them all as bullish, because TA-Lib scores every doji +100. Use a doji as a reason to look at the trend, the range and the next close, not as a signal in its own right.
Sources and further reading
- Steve Nison, Japanese Candlestick Charting Techniques (New York Institute of Finance, 1991)
- Thomas N. Bulkowski, Encyclopedia of Candlestick Charts (Wiley, 2008)
- TA-Lib source code — CDLDOJI and the default candle settings
- Finabase chart data — daily bars for 60 US stocks and ETFs, 2024-10-30 to 2026-10-29; patterns detected with TA-Lib CDLDOJI