Three Inside Up and Three Outside Up: The Rules
What a three inside up candlestick pattern is, how three outside up differs, the five published third-candle rules, and what each counts on EURUSD bars.
A three inside up is three candles: a long down candle, then a small up candle sitting inside its body, then a third candle that confirms. Three outside up is the same shape, except the second candle engulfs the first instead of sitting inside it.
The word doing the work in both definitions is "confirms", and the published rules for it do not agree. There are five of them, and they are different tests, not wordings of one test. Applied to the same 7,125 setups on EURUSD minute bars, they return 10 occurrences at one extreme and 5,007 at the other. So before you can test either pattern, you have to choose which of the five you are testing.
What is the three inside up pattern?
A down candle, then a small up candle whose body sits inside the first candle's body, which on its own is called a harami, then a third candle that confirms the turn.
The open-source TA-Lib library defines it as "a long real body, then a short real body totally engulfed by it (a harami), then a third candle of opposite color to the first that closes past the first candle's open".
Other sources replace that last clause with something else.
What is the three outside up pattern?
The same three-beat shape, except the second candle engulfs the first rather than fitting inside it. The same library calls it "an engulfing pair (candle 2's body fully engulfs candle 1's body) followed by a third candle that confirms in the engulfing direction".
That gives no number for "confirms". For the counts below we read it as a close above the second candle's close, and we say so rather than pretending the library specified it.
Are three inside up and three outside up in ChartLabs?
Both are, as two of the 61 candle pattern switches that sit inside one indicator. In the chart's Indicators menu, open the Standard list, find the Patterns heading, and add the entry called Candlestick Patterns. It draws on the price pane, so the marks land on the bars themselves.
The two switches do not start in the same state. Three Inside Up/Down is on the moment you add the indicator, and a completed pattern is marked 3IN. Three Outside Up/Down is off, so you open the indicator's settings and turn it on yourself before it marks anything; its code is 3OUT. A bullish reading goes below the bar's low. A bearish one goes above the high, which is also where the neutral patterns in the list are drawn.
For three inside, ChartLabs marks the first of the five third-candle rules below. Three Inside Up/Down asks the third candle to close beyond the first candle's open, and Three Outside Up/Down asks it to close beyond the second candle's close. Neither looks at the trend before the pattern.
What is the difference between three inside and three outside?
The second candle, plus how long the first one has to be.
| Three inside up | Three outside up | |
|---|---|---|
| Candle 1 | long down candle | down candle |
| Candle 2 | small up candle, body inside candle 1's body (a harami) | up candle, body engulfs candle 1's body |
| Candle 3 | confirmation | confirmation |
| Setups on EURUSD minute bars, January to August 2026 | 7,125 | 6,281 |
| Share of those setups that confirm under the third-candle rule ChartLabs uses | 54% | 93% |
That last row is a fact about the rules rather than about profit. On three outside up the confirmation is close to automatic: 5,863 of 6,281 engulfing setups clear it under the rule ChartLabs uses, and 5,366 under elearnmarkets' wording. On three inside up the same question leaves anywhere from 0.1% to 70% of the setups standing, depending on which definition you picked. The third candle barely filters a three outside up. It does most of the work on a three inside up.
What exactly does the third candle have to do?
Five different things, depending on who you read, each with what it costs on our bars.
Close past the first candle's open. This is the rule quoted above, and what ChartLabs marks. LiteFinance matches it: "The third confirming candle closes beyond the first candle's open, providing the entry signal."
Close above the second candle's high. elearnmarkets: "Third Candle: A bullish candle that closes above the high of the second candle, confirming buyer strength and the reversal." That is a lower bar than the first candle's open, since the second candle sits inside the first.
Close above the first candle's high. Strike.money sets the strictest version: the third candlestick "must have its opening halfway above the body of the first bearish candlestick and the third candlestick must close above the upper wick of the initial bearish candlestick". The upper wick of a down candle is its high, so this asks the third candle to clear the whole first candle, shadow included.
Open halfway above the first candle's body. That is the other half of the same Strike.money sentence, and it is a rule about the third candle's open rather than its close. Groww states it on its own: "The third candlestick is bullish in nature, and it needs to have an opening halfway above the body of the first bearish candlestick."
Swallow the previous two candles. Also Groww, a few paragraphs later in the same article: "The third flame must be strong enough to swallow the previous two candles, suggesting a possible reversal." That is the rarest shape of the five by a wide margin.
Now the counts. Same bars, same setups, only the third-candle rule changing. EURUSD, 1 January to 31 August 2026, our own cleaned data, 246,778 one-minute bars and the hourly and daily bars built from them. These are occurrence counts: how often the shape appears under each rule. They say nothing about what happened next, and nothing here measures that.
| Third-candle rule | Minute bars (7,125 setups) | Hourly (157 setups) | Daily (7 setups) |
|---|---|---|---|
| Closes past candle 1's open (the published rule, LiteFinance, what ChartLabs marks) | 3,845 | 87 | 5 |
| Closes above candle 2's high (elearnmarkets) | 5,007 | 97 | 6 |
| Closes above candle 1's high (Strike.money) | 3,039 | 48 | 5 |
| Opens above candle 1's body midpoint (Strike.money, Groww) | 3,370 | 55 | 3 |
| Swallows both previous candles (Groww) | 10 | 0 | 0 |
The spread on the minute bars is a factor of 500. Whichever rule you adopt, write it down before you start counting, because the count is mostly a property of the rule rather than of the market.
Two of the sources hold more than one of these at once. Strike.money's article asks in one place for a third candle that closes above the first candle's high, and in another for a third candle that opens halfway above the first body and "closes above the high of the second candlestick", which is elearnmarkets' threshold: three of the five rules in one article. Groww carries two of them, the halfway open and the swallowing rule. If you take your rule from a single article, check whether the article states it more than once.
What are the three inside down and three outside down patterns?
The mirror of each, upside down: an up candle, then a small down candle inside it, then a third candle confirming lower. Three outside down swaps the harami for an engulfing pair.
There is a wrinkle worth knowing. elearnmarkets publishes a different threshold for the down version than for the up version, inside one article. The up version asks for a close above the second candle's high. The down version gets two more: "Third Candle: A bearish candle that closes below both the second candle and ideally below the first candle's close", and then, under its own confirmation heading, "For the pattern to be valid, the third candle must close below the second candle's low."
So if you are mirroring a rule out of an article, check that the article mirrored it too.
Does the second or third candle have to gap?
Neither of the two definitions that mention a gap requires one of the up version, and on EURUSD a gap requirement would remove most of the chart.
elearnmarkets asks the second candle of the down version to open with one: "A smaller bearish candle that opens with a gap down and closes within the body of the first candle". Strike.money builds the third candle's gap into its explanation of why the pattern forms, saying "The increased number of bulls makes the third candlestick open with a huge gap up", and then treats the size of that gap as a forecast: "The greater the gap up between the closing of the second candlestick and the opening of the first candlestick the greater will be the trend reversal."
On those EURUSD minute bars, 28.74% of bars open at exactly the previous close, so no gap rule can be satisfied on any of them. A bar opens above the previous bar's high on 6.053% of the minute bars and 1.932% of the daily bars.
A rule that needs a gap up is therefore asking for something that shows up on roughly one minute bar in sixteen on this symbol, before any of the pattern's other conditions are tested.
Is "inside the body" measured with less-than or less-than-or-equal?
None of the five definitions says, and on a forex chart the answer decides whether the pattern exists.
The question is plain enough. If the second candle opens at exactly the price the first candle closed at, is it inside the first candle's body? Read strictly, it has to be strictly inside on both edges. Read loosely, touching the edge counts.
On EURUSD minute bars over those eight months there are 3,452 haramis on the strict reading and 7,125 if touching counts. The population roughly doubles on a choice of operator none of them states.
On an index, over the same eight months of minute bars, the same two counts are 5,928 and 5,993, about 1% apart. The reason is in the first number of the last section: the operator only matters where bars open at exactly the previous close, which is 28.74% of these EURUSD minute bars and 0.04% of the index symbol's.
That is not a bug in anyone's software. It does mean that if you count haramis by eye and a scanner counts them differently, the two of you are not disagreeing about the market.
Two notes on the counts themselves. We required the middle candle of a three inside up to be an up candle, which is how the explainers describe it, though the open-source library's summary does not specify its colour, and the built-in does not check it. And we measured "inside the body" on the real body, open to close, not on the full range including wicks.
Is three outside up just a bullish engulfing with an extra candle?
Close to it. The first two candles of a three outside up are a bullish engulfing pair, and the pattern adds a third candle asking for confirmation. Whether that addition changes anything is exactly what the five rules disagree about, and on our bars 93% of engulfing setups clear the version ChartLabs uses, so it filters out less than you might expect.
How do you write these patterns as rules you can test?
Five lines, all settled before the first trade:
- Candle colours: down, up, up for three inside up. Mirror them for the down version.
- The inside or outside test, with its comparison operator written out. Strictly inside, or touching allowed. Measured on the body or on the range.
- The third candle's threshold. One of the five above, named, with the source you took it from.
- Any gap requirement, or none.
- The trend test. Both of the open-source library's pages say they skip it. Their notes read: "Does not verify the prior trend the pattern classically assumes". The explainers treat the prior trend as part of the pattern. If you leave it out, write that down too.
How do you backtest three inside up by hand, step by step?
- Write those five lines down. Pick the third-candle rule first and do not revisit it mid-test.
- Pick one symbol and one timeframe, and expect the timeframe to dominate. The daily counts above are single digits over eight months.
- Choose a start date and hide everything after it.
- Step one bar at a time. Judge each completed three-bar window against your five lines, in order.
- Log every occurrence, then take the trade your plan calls for and let it resolve bar by bar.
- Keep stepping until you have a sample worth reading. Three daily occurrences is not one.
- Review the log rather than your memory.
What should you record for each occurrence?
Beyond the basics, one field is not enough, because the five thresholds compare different prices. Record the third candle's open and close, the first candle's open, close and high, and the second candle's high. With those stored you can re-sort the same log under a different threshold later instead of running the test again.
Also worth storing: whether the harami was strictly inside or touching an edge, the gap at each open, the symbol, the timeframe and the date.
In ChartLabs the record keeping happens while you work. Every trade captures a snapshot of the drawings, indicators and chart state at the moment of entry, so an occurrence you review in six weeks still shows the chart you judged at the time. Each trade carries a note field, and the notes come through in the trades CSV export. You can also tag trades as you backtest and then filter the analytics by tag, which is how you keep the occurrences that satisfied one third-candle rule separate from the ones that satisfied another.
What goes wrong when people test this by hand?
Changing the third-candle rule between occurrences. The table above is what that costs: the same setups support a count of 10 or a count of 5,007, so a test that drifts between two rules has no single answer.
Taking a scanner's output without knowing its rule. Any tool that flags these patterns has some threshold and some comparison operator built into it, whether or not it tells you which.
Mirroring a rule the source did not mirror. See the elearnmarkets down version above.
Where the rule lives, tool by tool
| Tool | What it does with the pattern | Who it fits |
|---|---|---|
| The open-source TA-Lib library | Its Three Inside Up/Down page asks for a third candle closing past the first candle's open. Its Three Outside Up/Down page asks only that the third candle confirms in the engulfing direction, with no number. Neither checks the prior trend | Someone writing code who will read the spec and fill the gaps |
| A charting scanner | Flags candidates automatically, with some threshold and some comparison operator built into it, whether or not it tells you which | Someone who wants a shortlist and will accept somebody else's definition |
| ChartLabs | The Candlestick Patterns indicator marks both, as the Three Inside Up/Down and Three Outside Up/Down switches: a third candle closing past the first candle's open for three inside, past the second candle's close for three outside. No scanner. You step through cleaned historical bars by hand against your own written rules, and the platform records the trade, the chart state, the notes and the tags | Someone who wants to know which of the five rules they actually tested |
Both switches run fixed thresholds, which you cannot change. If your written rule is a different one of the five, you mark the bars yourself, and at the end you know which version you counted. There is no scanner and no price alerts. The drawing tools we ship for named shapes are the wave and harmonic ones in the Wave Tools group, XABCD Pattern and ABCD Pattern among them, and those are hand-placed.
If you would rather have your own rule computed than judged bar by bar, write it as an indicator in the built-in Pine Script editor, starting from "Example: Mark bars by a rule" on the Pine Scripts tab. A Pine script can mark the bars it finds, with a shape or a label on the chart, so your chosen third-candle threshold shows up where it fires. There is no Pine backtesting: the script marks the chart, and you still step the bars and place the trades by hand.
Our data comes from Dukascopy, tick-level where it is available, cleaned to remove anomalies and converted to 1-minute candles, the lowest timeframe we carry. For more on how that affects a test, see backtesting accuracy and data quality. For the process itself, see backtesting a trading strategy and the forex backtesting guide.
Next step
Pick your third-candle rule, write it on paper, and go step through some bars. Start a free trial: 7 days, no credit card, one plan at $20 a month or $200 a year.
Related Topics
Related
Backtesting a Trading Strategy: A Beginner's Guide
What backtesting is, why it matters, and how to run one step by step: defining your rules, choosing clean historical data, stepping through the chart trade by trade, logging results, and reading the metrics that tell you whether your strategy has a real edge.
Forex Backtesting: Test Your Strategy on Real Data
A practical guide to backtesting forex strategies: why session dynamics, spread variation, and pair-specific behavior change your results, what clean historical data actually means, and a five-step process for testing a strategy before you risk real capital.
Manual vs Automated Backtesting: Which One Should You Use?
Automated backtesting tells you whether a set of rules made money. Manual backtesting tells you whether you can trade them. A practical comparison of what each one tests, what it costs you in time and skill, and which to reach for first.