Browse the library

Candlesticks · Single-candle patterns

Dragonfly doji: meaning, TA-Lib rules and a 380-case test

How to read a dragonfly doji, the three conditions Finabase’s detector checks, how it differs from a hammer and a takuri, and what 380 real cases did next.

On this page
  1. Anatomy of a dragonfly doji
  2. The exact rules Finabase uses
  3. The psychology of the long tail
  4. Confirmation
  5. Two real dragonflies
  6. What the data says
  7. Dragonfly doji versus its look-alikes
  8. An educational outline
  9. How Finabase shows dragonfly dojis
  10. Frequently asked questions
  11. Summary

The dragonfly doji looks like a capital T. The session opens, sellers drive the price down, buyers bring it all the way back, and the close lands at or near the open, which is also the high of the day. What remains on the chart is a long lower shadow hanging from a flat top.

It belongs to two families at once. It is a Doji candlestick: meaning, exact rules and what the data shows, because the open and close match. And it is a close relative of the Hammer candlestick pattern: meaning, rules and reliability, because it shows sellers pushing hard and then losing control within a single session. When it forms after a decline, many traders read it as a sign that lower prices are being refused.

This guide covers what the shape records, the exact test Finabase's detector applies, the subtle line between a dragonfly and a Takuri line candlestick: definition, TA-Lib test and results, two real cases from Tesla and Microsoft, and how 380 dragonflies on large US stocks actually performed.

Anatomy of a dragonfly doji

A dragonfly doji after a decline (illustration, prices not real) Long lower shadow, close at the high
An idealized dragonfly doji at the end of a decline. Open, high and close sit together at the top.

Three proportions make the shape:

  1. No real body to speak of. Open and close are effectively the same price.
  2. No upper shadow, or a stub. Nothing traded meaningfully above the open, so the session's high is where it started and finished.
  3. A clearly visible lower shadow. Price spent part of the session lower and came all the way back.

The length of that lower shadow is a sliding scale. A short tail is just a quiet day that dipped. A tail several times longer than recent candles' ranges is a dramatic rejection, and at the extreme the candle is often called a takuri line.

The exact rules Finabase uses

Finabase's dragonfly markers come from TA-Lib's CDLDRAGONFLYDOJI on daily bars. All three conditions are judged against the previous ten sessions:

Condition in TA-Lib Default setting
Doji body Real body ≤ 10% of the average high–low range of the previous 10 candles
Very short upper Upper shadow < 10% of the average high–low range of the previous 10 candles
Real lower shadow Lower shadow > 10% of the average high–low range of the previous 10 candles
Trend before it Not tested
Output +100 on every match

Three practical consequences:

The lower shadow only has to be "not very short". TA-Lib's comment in the source says the lower shadow is there to distinguish the dragonfly from other dojis, and the threshold is the same 10% used to call the upper shadow short. A tail that is a tenth of a normal day's range qualifies. Many candles the detector marks will have modest tails rather than the dramatic one in the illustration.

Everything is relative to recent volatility. After a run of wide-ranging sessions the 10% yardstick grows, so a candle whose body is a sizeable share of its own range can pass. The Tesla example below had a body equal to a third of its range, yet it qualified because the whole candle was small compared with the turbulent days before it.

No trend is checked, and the output is always +100. TA-Lib's own comments say the dragonfly must be judged relative to the trend, and then leave that judgment to you.

The psychology of the long tail

The dragonfly is a story told in the lower shadow. Sellers had the session to themselves for a while, enough to push price meaningfully below the open. Then demand appeared, whether bargain hunters, short sellers covering, or larger buyers working orders, and it absorbed every share offered on the way back up. The close at the high says the buyers were still in control at the bell.

After a decline, that sequence is the first evidence that the sellers' pressure can be soaked up. It is not proof of a bottom. The sellers may return the next morning, and often do. But the market has demonstrated, at least once, that lower prices bring in buyers. The same candle after an advance is read more cautiously: some traders call it a sign that the advance still has support, others note that a sharp intraday drop near a top shows sellers testing the trend.

Confirmation

Practitioners usually want the next session to agree before acting on a dragonfly:

  • A close above the dragonfly's high, which is also roughly its close, is the common rule. It is a low bar, because the high and close coincide.
  • A gap up on the next open that holds through the day.
  • Location: the tail reaching into a known support level, a prior low or a long-term moving average.
  • Momentum, for example the Relative Strength Index (RSI): how to read and use it turning up from below 30.

Because the bar for a confirming close is so low, confirmation filters out fewer bad dragonflies than it does for patterns with a high far above the close.

Two real dragonflies

Tesla (TSLA) daily — a dragonfly doji near the April 2025 low $250 $300 $350 Dragonfly doji 2025-04-17 +19.0% after 10 sessions Apr May
Tesla (TSLA), March to May 2025. Shaded candles are every dragonfly TA-Lib detected; the labelled one formed on 2025-04-17.

Tesla, April 17, 2025. TSLA had fallen 9.7% over the prior ten sessions in a volatile market. The April 17 session opened at $243.47, reached only $244.34, fell to $237.68 and closed at $241.37. The body was $2.10, a third of the candle's range, which would fail most eye tests for a doji. It passed TA-Lib's test because the whole candle spanned only $6.66, about a quarter of the recent average range. Its lower shadow of $3.69 was less than twice the body, so this is one of the four dragonflies TA-Lib did not also call a takuri. The next session closed at $227.50, below the dragonfly's low, a failed confirmation and a stop-out for anyone using the low as a stop. Then the stock surged: five sessions after the dragonfly it was 18.1% higher and ten sessions after it 19.0% higher, trading as high as $294.86. The pattern was right about the area and wrong about the timing.

Microsoft (MSFT) daily — a confirmed dragonfly doji that still failed, June 2026 $350 $400 $450 Dragonfly doji 2026-06-12 −5.7% after 10 sessions May Jun Jul
Microsoft (MSFT), May to July 2026. The dragonfly on 2026-06-12 was confirmed the next day and still failed.

Microsoft, June 12, 2026. MSFT had fallen 13.2% in ten sessions. On June 12 it opened at $391.43, dropped to $382.27 and recovered to $390.74, a lower shadow of $8.47 against a 69-cent body: a clean dragonfly, and a takuri too. Broadcom and Oracle printed dragonflies the same day. The next session closed at $399.76, comfortably above the high, which is the textbook confirmation. It did not last. Five sessions later MSFT was 6.0% below the dragonfly's close, ten sessions later 5.7% below, and it traded down to $349.20 in that window, well under the dragonfly's low. A confirmed pattern with a well-defined stop still loses; the stop is what keeps the loss small.

What the data says

We ran CDLDRAGONFLYDOJI over daily bars from October 30, 2024 to October 29, 2026 for 60 large US stocks and ETFs. It fired 380 times, on all 60 symbols, and 371 cases had ten sessions of data after them. The two trend rows are our own split of the same data.

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 dragonfly doji 371 56.9% +0.96% +1.06%
Dragonfly after a 10-session decline 188 56.9% +0.84% —
Dragonfly after a 10-session advance 189 57.1% +1.00% —
Confirmed: next close above the high, from that close 166 52.4% +0.49% —

Three observations:

The raw numbers lean positive. 56.9% higher after five sessions, against 53.1% for any day, and an average five-session return close to three times the baseline. That is the strongest showing in the doji family.

The trend before it made no difference. Dragonflies after an advance did just as well as dragonflies after a decline. A reversal signal should work better where there is something to reverse. This looks more like a short-term tendency of candles that close at their high than like a reversal effect.

Confirmation removed the edge. Measured from the confirming close, the point where you could actually act, the hit rate fell to 52.4%, below the baseline. Part of the dragonfly's apparent edge seems to be realized in the very next session.

Dragonfly doji versus its look-alikes

Pattern Body Upper shadow Lower shadow Where it matters
Dragonfly doji Doji Almost none More than 10% of the average range After a decline
Takuri Doji Almost none More than twice the body After a decline
Hammer Small, not necessarily doji Very short Longer than the body After a decline
Hanging man Small Very short Long After an advance
Gravestone doji Doji Long Almost none After an advance
Long-legged doji Doji Any Any (one shadow longer than body) Anywhere

The Gravestone doji: meaning, rules and why Finabase files it bullish is the dragonfly turned upside down: the rejection happens above the open instead of below it.

An educational outline

This is a way to structure study of the pattern, not a recommendation to trade.

  1. Find a real decline first. Measure the prior ten sessions. Our data says the dragonfly's numbers did not depend on it, but the stop placement logic does.
  2. Measure the tail. Prefer a lower shadow at least as long as an average day's range. Short tails are routine.
  3. Decide on confirmation in advance. Our test suggests it costs part of the move; it also screens out cases like the Tesla stop-out.
  4. Put the stop under the low and size from there.

How Finabase shows dragonfly dojis

  • Chart markers. The Dragonfly Doji study marks every CDLDRAGONFLYDOJI detection on a symbol's chart. With about 1.3% of days qualifying, a typical stock shows a few per year.
  • Scanner. The candlestick scanner sorts detections by the sign of TA-Lib's output, and a dragonfly is always +100, so they appear in the Bullish list (S&P 500 dragonfly dojis). For this pattern the label agrees with the usual reading after a decline, but the scanner does not check that a decline happened.
  • Signals-tab gauge. Each of the 61 patterns votes from its most recent detection in the last eight bars. A dragonfly always votes Buy; in our data it did so on 9.6% of stock-days. Every dragonfly is also a doji, so on the day it forms it brings the doji and long-legged doji Buy votes with it, and usually a takuri vote as well.

Frequently asked questions

Is a dragonfly doji bullish?

After a decline it is usually read as a potential bullish reversal, because it shows a sell-off fully reversed within the session. After an advance its meaning is debated. In our sample the outcomes were similar in both contexts and modestly better than average.

What is the difference between a dragonfly doji and a hammer?

A dragonfly has no real body, so it closes exactly where it opened. A hammer has a small body, which can be green or red, near the top of its range. TA-Lib's hammer also requires the body to sit near the previous candle's low.

Does the color of a dragonfly doji matter?

Hardly. The body is so small that its color reflects a few cents. The length of the lower shadow and the location of the candle matter far more.

How long should the lower shadow be?

There is no official minimum. TA-Lib asks only that it exceed 10% of the recent average range. A tail at least as long as a normal day's range is a more convincing rejection, and one more than twice the body also makes it a takuri.

Summary

The dragonfly doji records a sell-off that was completely undone by the close, with the open, high and close stacked together above a long tail. TA-Lib's version is broad on the tail and silent on the trend, and it fired on about 1.3% of days in our sample. Those dragonflies did somewhat better than an average day, regardless of the trend in front of them, and the edge faded once you waited for confirmation. Finabase marks them, lists them as bullish and counts them as Buy votes. Use the pattern to locate places where buyers stepped in, then let the trend, the tail and your stop do the work.

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 — CDLDRAGONFLYDOJI 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 CDLDRAGONFLYDOJI