Candlesticks · Two-candle patterns
Harami cross: a doji inside a long candle, rules and results
What a harami cross is, how TA-Lib decides the inner candle is a doji, why it always doubles as a harami in Finabase, and what 739 real cases did next.
On this page
- Anatomy: a long body, then a cross
- The exact rules Finabase uses
- Why a doji after a long candle draws attention
- What confirmation looks like
- Two harami crosses: one confirmed, one overrun
- The data: 739 harami crosses
- How the harami cross compares
- An educational outline for a harami cross
- How Finabase shows harami crosses
- Frequently asked questions
- Summary
The harami cross is a two-candle pattern in which a long candle is followed by a doji, a session that opens and closes at almost the same price, whose tiny body sits inside the long candle's body. In candlestick charting a doji is drawn as a cross, hence the name. It is the special case of the Harami candlestick pattern: the inside body and what it signals where the second candle has shrunk to almost nothing.
Japanese candlestick tradition gives this variant more weight than an ordinary harami. A small second body says the trend slowed. A doji says the market reached a point where buyers and sellers were exactly balanced, right after one side had dominated. Nison singled it out as the more important of the two, especially at the top of a strong advance.
This page covers how TA-Lib decides a candle is a doji, why every harami cross on a Finabase chart is counted twice, two cases from late 2024 and early 2026, and what 739 harami crosses on 60 large US stocks and ETFs did afterwards.
Anatomy: a long body, then a cross
The bearish harami cross, the version traders discuss most, has this sequence:
- A clear advance of several sessions.
- A long green candle that extends the advance, often the largest body in some time.
- A doji the next session: the open and close nearly equal and both inside the green body. The doji's shadows may reach above or below the green body without disqualifying the pattern.
The bullish version reverses each element: a decline, a long red candle, then a doji inside its body. Because the doji has no meaningful color, the only directional information is the long candle and the trend before it.
The exact rules Finabase uses
Finabase's chart study, scanner and gauge use TA-Lib's CDLHARAMICROSS. The function is
identical to the harami test except for the size rule on the second candle:
| What is checked | 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 |
| Doji strictly inside (±100) | Top of the doji's body below the first body's top, bottom above its bottom |
| Doji touching an edge (±80) | Same, but the doji's open or close may equal the first body's edge |
| Direction | Opposite to the first candle's color |
| Prior trend | Not tested |
How "doji" is measured
The doji test compares the second candle's body with the range of recent candles, not with recent bodies. If a stock's last 10 sessions averaged a $4.00 high-to-low range, any body of $0.40 or less counts. On a quiet utility stock with a $1.00 average range, the cutoff is $0.10. This keeps the definition consistent across cheap and expensive, calm and volatile stocks, but it also means a "doji" on a volatile name can show a visible body on the chart.
Why the pattern always doubles as a harami
The harami test only asks that the second body be no longer than the average recent body. A body under 10% of the average range is almost always below that bar, because bodies are normally a large fraction of ranges. In our sample all 739 harami crosses were also haramis, and all had the same sign. Harami crosses made up about a third of all haramis.
The ±80 variant
As with the harami, TA-Lib scores a doji whose body exactly touches an edge of the long body as ±80 rather than ±100. That happened 16 times in 739, about 2%. Finabase's scanner and gauge use only the sign, so these appear and vote like any other harami cross.
Why a doji after a long candle draws attention
A long green candle is the market voting for higher prices with conviction. The next session should, if the trend is healthy, open firm and carry on. In a bearish harami cross it opens inside the prior body, wanders, and closes where it opened. All the energy of the previous session is gone. Neither side won.
That indecision is most noticeable when it follows an extended run, because extended runs depend on new buyers continuously arriving. A doji suggests the supply of eager buyers met an equal supply of sellers at that price. It is still only a suggestion: a market can pause for a day and resume, and the doji shows only that the pause happened.
The bullish case is the same in reverse. Sellers who pushed out a long red candle could not follow through the next day, and the session closed unchanged.
What confirmation looks like
- A decisive next session. For a bearish cross, a close below the doji's low. For a bullish one, a close above the doji's high. This is the rule our study uses.
- A large first candle. The pattern is more striking after an exceptionally long body, the kind that ends a climactic run.
- A tight doji. Many traders want open and close within a few cents, stricter than TA-Lib's 10%-of-range test.
- Location. A doji at a prior high, a round number or a gap level carries more information than one in open space.
- Next-day gap. A gap away from the doji in the reversal direction turns the sequence into something close to a three-candle star. If the doji had gapped outside the first body instead of sitting inside it, you would be looking at a Doji star candlestick: a gapping doji after a long candle.
Two harami crosses: one confirmed, one overrun
Broadcom, December 17, 2024 (bearish, confirmed, mixed outcome). Broadcom had risen 43% in ten sessions. On December 16 it printed a long green candle from $231.79 to $250.00. On December 17 it opened at $240.65 and closed at $240.23, a 42-cent body on an $8.67 range, inside the prior body: a textbook bearish harami cross, and also a bearish harami. The next session closed at $223.62, below the doji's $233.80 low, which confirmed it. Then the result muddied. Broadcom traded as low as $217.58 within ten sessions but recovered, ending ten sessions 3.4% under the doji's close and above the confirmation close. A short taken at confirmation would have been underwater ten days later.
UnitedHealth, April 20, 2026 (bearish, failed). UNH had gained 15% in ten sessions. A green candle from $320.05 to $324.63 was followed by a doji from $324.19 to $323.48, inside it. The next morning the stock opened at $353.01, about 9% higher, and never looked back: ten sessions after the doji it was 14.6% above it. The doji captured one quiet session before a large repricing. Nothing in the two candles could have anticipated it, which is why a defined exit above the long candle's high matters.
The data: 739 harami crosses
We ran CDLHARAMICROSS over 29,760 daily bars, 60 large US stocks and ETFs from October
30, 2024 to October 29, 2026, and compared the five-session outcome after each signal
with the outcome for every day.
| Group | Cases | Went its way after 5 sessions | Any-day baseline | Average 5-session return | Average 10-session return |
|---|---|---|---|---|---|
| Bullish harami cross | 378 | 49.6% | 53.1% | +0.01% | −0.06% |
| Bullish, confirmed (from confirmation) | 109 | 70.6% | 53.1% | +1.11% | |
| Bearish harami cross | 361 | 51.1% | 46.7% | +0.06% | +0.40% |
| Bearish, confirmed (from confirmation) | 109 | 56.0% | 46.7% | +0.34% |
Returns are price changes, so the positive averages after bearish crosses mean those stocks rose slightly on average even though more than half fell.
The bare pattern was noise. Bullish crosses were higher a week later less often than an average day. Bearish crosses fell a little more often than baseline, but their average return was still slightly positive.
Confirmation changed the picture, on modest samples. Confirmed bullish crosses rose over the next five sessions 70.6% of the time with a +1.11% average, measured from the confirming close. Confirmed bearish crosses fell 56.0% of the time against a 46.7% baseline. Both were the better results among the harami-family tests, and both rest on just 109 cases each.
How the harami cross compares
| Pattern | Second candle | Location of second body | Typical reading |
|---|---|---|---|
| Harami cross | Doji | Inside the first body | Indecision after a push |
| Harami candlestick pattern: the inside body and what it signals | Small body, any color | Inside the first body | Momentum stalls |
| Doji star candlestick: a gapping doji after a long candle | Doji | Gapped outside the first body | Exhaustion, needs day three |
| Engulfing candlestick pattern: bullish and bearish rules and data | Large opposite body | Covers the first body | Takeover by the other side |
| Inside day | Any | Whole range inside prior range | Volatility contraction |
An educational outline for a harami cross
This is how the pattern is typically framed, not a recommendation.
- Insist on a real first candle. A long body that extends a move of several sessions.
- Wait one more session. A close beyond the doji's range in the reversal direction.
- Place invalidation beyond the long candle's extreme, not the doji's. For a bearish cross, above the long green candle's high. The doji's range is often too narrow to survive normal noise.
- Size from that distance, accepting that it is wider than the doji alone suggests.
How Finabase shows harami crosses
- Chart. Add Harami Cross (or open the AVGO chart with it on) and each doji that completes the pattern is marked. Add Harami as well and the same candles are marked by both studies.
- Scanner. Detections are sorted by the sign of TA-Lib's output: bullish crosses (+100, +80) on the Bullish list and bearish crosses (−100, −80) on the Bearish list.
- Signals gauge. Each of the 61 patterns votes in the Candlestick gauge on a symbol's
Signals tab (AVGO for example) based on its latest non-zero
output in the last eight bars. A harami cross fires both
CDLHARAMICROSSandCDLHARAMI, so it adds two Buy or two Sell votes, a little more weight than its evidence deserves.
Frequently asked questions
Is a harami cross stronger than a harami?
Tradition says yes, because a doji is a stronger statement of indecision than a small body. In our sample the raw versions of both were close to random, while the confirmed harami cross did somewhat better than the confirmed harami, on a smaller sample.
Does the doji have to be perfectly flat?
No. TA-Lib accepts a body up to 10% of the recent average daily range. Traders who want a tighter definition filter the markers by eye.
What if the doji's shadows stick out of the first candle?
That is fine. Only the doji's body has to sit inside the first candle's body. Long shadows on the doji show a wide, undecided session and are sometimes read as extra indecision.
Why does one candle show two patterns in Finabase?
Because TA-Lib's harami test also accepts a doji as a small body. Every harami cross is therefore a harami too, and both studies mark it.
Summary
The harami cross is a long candle followed by a doji inside its body: a strong move met
by a session in perfect balance. TA-Lib defines the doji relative to the recent average
range, takes direction from the first candle, ignores the prior trend, and returns
the same signal as CDLHARAMI on every occurrence, so Finabase effectively counts it
twice. On our two-year sample the raw pattern was noise, while confirmed crosses
showed a promising but statistically thin edge. Treat the doji as a question, and let
the next close answer it.
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 — CDLHARAMICROSS 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 CDLHARAMICROSS