Browse the library

Candlesticks · Three-candle patterns

Three inside up and three inside down: the confirmed harami

How the three inside up and three inside down patterns form, TA-Lib’s exact test, two real cases from 2026, and how 467 detections on US stocks performed.

On this page
  1. Anatomy of the pattern
  2. Why the pattern makes sense
  3. Additional confirmation
  4. Real examples from 2026
  5. What the data says
  6. Three inside versus related patterns
  7. An educational outline for trading it
  8. How Finabase shows three inside up and down
  9. Frequently asked questions
  10. Summary

"Three inside" is a harami with its confirmation attached. The first two candles form a harami: a long candle followed by a small one whose body fits inside it, like a child inside its mother (harami is Japanese for pregnant). The third candle then moves in the opposite direction to the first and closes beyond the first candle's open, turning a hint of hesitation into an actual change of direction.

After a decline the pattern is called three inside up: long red, small body inside it, then a green candle closing above the red candle's open. After a rally it is three inside down: long green, small body inside, then a red candle closing below the green candle's open. One TA-Lib function, CDL3INSIDE, detects both and signs the result.

Unlike several star patterns, this one works in Finabase out of the box, with no settings quirk. Among the three-candle reversals with enough cases to measure, it is also the one where our test found a clearly better-than-average result for one side, so both the numbers and their limits deserve a careful look.

Anatomy of the pattern

Three inside up: a harami, then a close above candle 1 (illustration, prices not real) Small body inside the long red one Close above the first open
Three inside up. The middle body fits inside the first; the third candle closes above the first candle’s open. Prices are illustrative.
Three inside down: a harami, then a close below candle 1 (illustration, prices not real) Small body inside the long green one Close below the first open
Three inside down, the bearish mirror image. Prices are illustrative.

Taking three inside up step by step:

  • Candle 1, the mother. A long red body that extends the decline.
  • Candle 2, the child. A small body that sits entirely within the first body: it opens and closes above the red candle's close and below its open. Its shadows may poke outside; only the body has to fit. The child's color is not part of the rule, although many traders like to see it green.
  • Candle 3, the follow-through. A green candle that closes above the mother's open. At that point the whole of the first day's loss has been reversed.

The bearish version flips every color and direction. In both, the first two candles alone are a harami, a pattern Finabase also detects separately. The third candle is what makes it "three inside".

The exact rules Finabase uses

Finabase runs TA-Lib's CDL3INSIDE on daily bars. The function returns +100 (up) or −100 (down) on the third candle when all of the following hold, with TA-Lib's default candle settings:

Candle Three inside up Three inside down
1 Red; body longer than the average body of the previous 10 candles Green; body longer than the average body of the previous 10 candles
2 Body no longer than the average body of the previous 10 candles Same
2 Body strictly inside candle 1's body (both ends) Same
3 Green, closing above candle 1's open Red, closing below candle 1's open

The sign comes straight from the first candle: TA-Lib outputs minus the first candle's color times 100, so a red first candle gives +100.

How this compares with the textbook:

  • No trend test. TA-Lib's comment asks the user to judge whether three inside up appears in a downtrend; the code itself never looks. In our sample only 38.5% of the bullish detections followed a 10-session decline.
  • Definitions of the third candle vary. Some authors require the third close to clear the first candle's high, a stiffer test. TA-Lib asks only for a close beyond the first candle's open, the top of a red body or the bottom of a green one.
  • The third candle's size is free. Any green candle that closes high enough counts, whether it is long or modest.

Why the pattern makes sense

A harami is a story of momentum fading. The first candle is a full-strength move by the dominant side. The next session cannot even reach the first day's open or close: price is trapped inside yesterday's body, and the range of opinion has narrowed. That pause, on its own, is ambiguous.

The third candle resolves the ambiguity. For three inside up, buyers not only break out of the small second candle but push the close above the level where the big red day began. Anyone who sold during the red candle is now behind. In effect the pattern has built its own confirmation into the third session, which is why some traders prefer it to the bare harami.

The cost is the same as with any confirmation: by the time the third candle closes, a good part of the move may already have happened.

Additional confirmation

Because the third candle already confirms the harami, traders tend to look for evidence outside the pattern:

  • A further close beyond the third candle's extreme (above its high for the bullish version), the rule our test uses.
  • Location: three inside up at prior support, three inside down at prior resistance.
  • Volume rising on the third candle.
  • Momentum: an Relative Strength Index (RSI): how to read and use it turning from oversold (up) or overbought (down).

Real examples from 2026

Meta Platforms (META) daily — three inside up at the March 2026 low $550 $600 $650 $700 Three inside up 2026-03-31 +17.4% after 10 sessions Mar Apr
Meta Platforms (META): every CDL3INSIDE detection in the window is shaded. The labeled one completed on 2026-03-31 after an 8.1% ten-session decline.

Meta Platforms, March 31, 2026 (three inside up, worked). Meta had dropped 8.1% in ten sessions. On March 27 it fell from $540.10 to $525.72. On March 30 it opened and closed at $536.38, a doji whose body (a single price) sat inside the red body. On March 31 it closed at $572.13, far above the March 27 open. The next session closed higher still, above the third candle's high. Five sessions after the pattern Meta was up 7.0%, and after ten it was up 17.4%.

Qualcomm (QCOM) daily — a three inside down that failed within a day, May 2026 $150 $200 $250 Three inside down 2026-05-04 +20.9% after 10 sessions Apr May
Qualcomm (QCOM): a three inside down on 2026-05-04, after a 22.4% ten-session rally. The next session rose 10.8%.

Qualcomm, May 4, 2026 (three inside down, failed). Qualcomm had surged 22.4% in ten sessions, including a jump from $156.00 to $179.58 on April 30. May 1 was a small red body inside that big green candle, and on May 4 the stock fell to $168.38, below the April 30 open of $172.05. Every rule was met. The next day it jumped 10.8% to $186.55, and five sessions after the pattern it was 41.1% higher. When a stock is being re-priced by news, a three-day reversal pattern is a small voice in a loud room.

For balance, the down version did also produce dramatic successes. Oracle completed a three inside down on June 3, 2026 after a 26.9% ten-session rally and was 20.3% lower ten sessions later.

What the data says

We ran CDL3INSIDE over daily bars from October 30, 2024 to October 29, 2026 for 60 large US stocks and ETFs, 29,760 day-samples. A bullish hit is a higher close five sessions later; a bearish hit is a lower close. Baselines are the shares of all days followed by a higher (53.1%) or lower (46.7%) close.

Group Cases Hit after 5 sessions Baseline Average 5-session return Average 10-session return
Three inside up (244 measurable) 250 61.9% 53.1% +0.84% +1.54%
Three inside up, confirmed (from confirmation close) 92 53.3% 53.1% +0.61% —
Three inside down (213 measurable) 217 45.5% 46.7% +0.61% +0.90%
Three inside down, confirmed (from confirmation close) 78 48.7% 46.7% +0.85% —

Average returns are price changes, so for the down version a positive number means the stock rose on average after the bearish pattern.

The bullish side looked good, with an asterisk. Three inside up was followed by a higher close 61.9% of the time, nearly nine points above the baseline, with an average gain of 0.84% over five sessions and 1.54% over ten. That is the strongest result among the three-candle reversal patterns with enough cases to measure. But when we waited for an extra confirming close and measured from there, the hit rate fell to 53.3%, essentially the baseline. Much of the measured edge sat in the first session or two after the pattern, which a trader waiting for extra proof would not capture.

The bearish side was a coin flip. Three inside down was followed by a lower close slightly less often than an average day, and prices rose on average afterwards. In a two-year period when large US stocks mostly climbed, bearish reversal shapes generally struggled; this one was no exception.

Pattern First two candles Third candle
Three inside up/down Harami: small body inside a long one Closes beyond the first candle's open
Harami (two candles) Small body inside a long one None: the pattern ends at candle 2
Three outside up and down: engulfing plus a follow-through day up/down Engulfing: a body that covers the previous one Closes beyond the second candle's close
Morning star candlestick pattern: rules, examples and test results Long red, then a small body below it Green, closing well into candle 1
Evening star candlestick: how to spot a three-day top Long green, then a small body above it Red, closing well into candle 1

Three inside and Three outside up and down: engulfing plus a follow-through day are a natural pair. One starts from a contraction (the inside candle), the other from an expansion (the engulfing candle). In our data the two never fired on the same bar.

An educational outline for trading it

The following outline shows how the bullish version is commonly approached; reverse everything for the bearish one. It isn't a recommendation, and the numbers are invented.

  1. Context first. A decline into support gives three inside up something to reverse.
  2. Check the harami. A very small second body, ideally a doji, shows clearer indecision than a medium one.
  3. Act at the third close, or wait. Our data suggests most of the measured gain came early, so a trader who waits pays for that certainty.
  4. Invalidation sits below the lower of the first two candles' lows.
  5. Size from the distance to that level.

How Finabase shows three inside up and down

  • Chart markers. Add Three Inside Up/Down (CDL3INSIDE) to a chart and Finabase marks the third candle of each detection, on both sides.
  • Scanner. The candlestick scanner sorts every detection by the sign of TA-Lib's output, so three inside up (+100) appears on the Bullish list and three inside down (−100) on the Bearish list.
  • Signals tab. On a symbol's Signals tab (for example AAPL), the Candlestick gauge gives each of its 61 patterns one vote based on its most recent detection in the last eight bars: Buy for a three inside up, Sell for a three inside down, Neutral if neither fired. The gauge reads Strong Buy, Buy, Neutral, Sell or Strong Sell from the balance of votes.

Frequently asked questions

What is the difference between a harami and three inside up?

The third candle. A harami is two candles: a long body and a small body inside it. Three inside up adds a green candle that closes above the first candle's open, which most traders treat as the harami's confirmation.

Does the middle candle's color matter?

Not in TA-Lib, and not in most definitions. Only its body size and position inside the first body are tested.

Is three inside up a reliable pattern?

It was the best performer of the three-candle reversals in our test: 61.9% of 244 measurable cases were higher five sessions later, against 53.1% for all days. Measured from a later confirmation close, though, it was close to average.

Why do I see three inside signals where there was no prior trend?

Because TA-Lib does not check the trend. The pattern is a pure shape test, and judging whether a decline or rally came first is up to you.

Summary

Three inside up and down turn the harami's hesitation into a decision by adding a third candle that closes beyond the first candle's open. TA-Lib detects both sides without a trend check, and Finabase shows them on charts, in the scanner and in the Signals gauge with no special settings. In our two-year test the bullish side beat an average day by about nine points, although the edge mostly faded when measured from a later entry, and the bearish side was no better than chance. Use it with context, and with a clear line below the pattern where the idea is wrong.

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