In this article
After this article, you can
- Check the second body’s size and placement separately.
- Express “inside” as explicit price inequalities.
Terms at hand: Trading Plan · Backtesting · Trading Journal · Stop loss · Win Rate · Relative Strength Index (RSI)
Three Inside Up and Down combine a small second body contained inside the first with a third-candle closing condition. Confirmation means that a specified recognition rule has been met, not that the market must reverse. Decide whether the third close must cross the first Open or the first High/Low before comparing occurrences.
What are the Three Inside Up and Three Inside Down patterns?
TA-Lib 0.6.4 CDL3INSIDE compares C3 with O1, uses strict body containment and historical body-size thresholds, and does not test the preceding trend or second-candle color. A stricter C3 beyond H1 for Up or L1 for Down is a different geometric filter. Our worked model below uses O1, with an explicitly directional third body; it is not a complete copy of the library’s settings.
The underlying bullish and bearish Harami pattern concerns bodies: the intervals between Open and Close. It does not automatically require the second candle’s entire High/Low range to fit inside the first. ChartSchool describes multiple body-color combinations; price geometry alone does not reveal hesitation or control by a particular group of traders.
A small body and an inside body are separate conditions
Body A spans 99–103, length 4; B spans 102–106, also 4. Both pass 4 ≤ 5, but only B is strictly inside first body [100; 110]. A starts below its lower edge. Size does not test placement.
Apply both tests: second-body length, and min(O2, C2) > 100 with max(O2, C2) < 110. “Small candle” does not replace the inequalities. If a variant permits equality, record that separately; boundaries here are strict. This checks geometry, not later price direction.
Assumptions: Fictional prices in arbitrary units. The first falling body [100; 110] has length 10. Our second-body size limit is half that, 5. We compare only size and strict containment, not the complete detector flag. Official material: TA-Lib 0.6.4: CDL3INSIDE.
How do you identify the setup on a chart?
For our custom Up model, require three decreasing closes before candle 1; for Down, three increasing closes. The first body must be at least twice the fixed mean of the five earlier bodies. The second body may be no more than half of the first, with both edges strictly inside it. Candle 3 is strictly bullish for Up or bearish for Down, closes beyond O1 and has no additional size threshold. These choices exclude a third doji and are illustrative, not optimized.
Test size and placement separately. For a first body [100,110], a second body [99,103] has size 4 and passes a size limit of 5, but fails containment; [102,106] passes both. In general require min(O2, C2) > min(O1, C1) and max(O2, C2) < max(O1, C1). A wick crossing the chosen third-close threshold cannot substitute for the final Close.
If O2 equals C1, it lies on a first-body boundary and fails our strict rule. Permitting equality changes the specification. Do not assume consecutive FX opens always equal the preceding closes, or that gaps can occur only after weekends. Preserve the feed, instrument, Bid/Ask or other price series, candle time zone and rounding: one boundary-price difference can change classification.
What does it look like in an example?
Both fictional EUR/USD examples assume one pip = 0.0001 and a mean of 40 pips for the five bodies before the trio. Pre-Up closes are 1.0980, 1.0950, 1.0930; pre-Down closes 1.0820, 1.0850, 1.0870. The context and mean are assigned inputs, not prices inferred from a later reversal.
| Case / candle | Open | High | Low | Close |
|---|---|---|---|---|
| Up 1 | 1.0900 | 1.0920 | 1.0780 | 1.0800 |
| Up 2 | 1.0820 | 1.0860 | 1.0810 | 1.0850 |
| Up 3 | 1.0850 | 1.0930 | 1.0840 | 1.0910 |
| Down 1 | 1.0900 | 1.1020 | 1.0880 | 1.1000 |
| Down 2 | 1.0980 | 1.0990 | 1.0940 | 1.0950 |
| Down 3 | 1.0950 | 1.0960 | 1.0870 | 1.0890 |
Each first body is 100 pips and passes 100 ≥ 2 × 40. Each second body is 30 pips, passes 30 ≤ 50 and lies strictly inside. In Up, bullish C3 = 1.0910 exceeds O1 by 10 pips but stays below H1 = 1.0920. In Down, bearish C3 = 1.0890 is 10 pips below O1 but remains above L1 = 1.0880. Both meet our O1 rule and fail the additional H1/L1 filter. Down’s Low 1.0870 does not replace its Close.
Where do you place the entry, stop-loss and target?
The complete pattern is available only after candle 3 closes. A condition met during the open bar may disappear before its final Close. Do not assign the completed signal to that candle’s opening, and do not assume a later order fills at C3. Entry timing, stop reference, target, expiry and position size are separate plan rules; an ordinary stop does not guarantee a maximum loss.
A boundary below or above the formation is one possible invalidation rule, not the only valid stop price implied by the name. Calculate its distance, intended exposure and costs using the execution price series. Additional support, target or RSI rules define new versions to evaluate. A favorable-looking distance ratio does not supply an expected win probability.
What changes when the third candle is required?
Requiring candle 3 changes both the selected observations and decision time. It does not establish fewer losing trades, a higher win rate or a universally worse entry price. Compare precisely specified Harami and Three Inside strategies on the same data with their own valid order timing, exits and costs.
Nor does comparison with an Engulfing pattern establish a ranking of signal strength. Test every qualifying case, including failures and missed orders, rather than selecting charts where the next move matched the pattern label.
Equality handling has a concrete effect in TA-Lib’s code: its candle color is non-bearish when C ≥ O. Up therefore can accept a third doji, while Down requires a strictly bearish third candle. Consider twelve earlier bars (100,110, 98,105), then (100,102, 88, 90), (93, 97, 92, 96) and doji (101,102,100,101), all O/H/L/C. The source conditions give +100. Reflect each price as 200 − p, swapping High and Low; the third doji becomes (99,100, 98, 99), below O1 = 100, but the code gives 0. Changing only its Open and High to 100 makes it bearish and gives −100. Our custom directional-third-body rule rejects both doji cases. This hypothetical code-condition comparison is not a trade result or a new historical study.
How do you tell Three Inside apart from similar patterns?
Compare the Three Outside Up and Down setup and morning star pattern using their own candle relationships, context and equality conventions. A name or visual resemblance does not establish that the patterns select identical observations, identify an accelerating trend or deliver the same trading result. Record the specific detector rather than treating confirmation as a universal guarantee.
What to do tomorrow
- Fix one recognition version and choose the third-close threshold: O1 or the additional H1/L1 boundary. Record strict and inclusive inequalities separately.
- Check the body-size and body-location tests independently on full OHLC. Test boundary equality and doji explicitly.
- Record the price feed and candle clock, then recognize the signal only when its required final prices are available.
- Evaluate the entry, exit, exposure and cost rules as a complete method. An optional RSI filter needs its own comparison, not an arbitrary twenty-trade certification.
- Use the technical analysis section to compare definitions while keeping selected examples separate from an evaluation sample.
Check your understanding
One short exercise
About 2 min · you can try again
First body is [100; 110], second [99; 103]; size limit 5. Which conditions pass?
- Both, because length 4 is small.
- Size passes; placement fails.
- Placement passes; size fails.
Check the answer and explanation
Size passes; placement fails.
Correct. 4 ≤ 5, but 99 is not greater than the lower boundary 100.
Frequently asked
What are the Three Inside Up and Three Inside Down patterns?
What changes when a third-candle condition is added?
How do you correctly trade the Three Inside Up or Three Inside Down pattern?
Sources & bibliography
-
Candlecharts.com (Steve Nison) Candlestick Trading Courses — Shop · Steve Nison’s website offering candlestick trading courses. candlecharts.com ↗
-
StockCharts ChartSchool Candlestick Charts — Education Hub · Comprehensive educational resource covering candlestick pattern formation, reversal signals, and pattern dictionaries. chartschool.stockcharts.com ↗
-
StockCharts ChartSchool Candlestick Pattern Dictionary · An alphabetical reference to candlestick patterns and their conventional signal descriptions. chartschool.stockcharts.com ↗
-
TA-Lib CDL3INSIDE implementation, version 0.6.4 · Exact contained-body and third-close conditions, with historical sizing and no built-in preceding-trend test. This separates detector recognition from a trading strategy. raw.githubusercontent.com ↗
-
TA-Lib Candlestick utility macros, version 0.6.4 · Body and candle-color arithmetic, including the non-bearish classification of equal Open and Close that explains the detector’s doji asymmetry. raw.githubusercontent.com ↗
-
StockCharts ChartSchool Candlestick Bullish Reversal Patterns · Harami body containment, alternative color combinations and preceding context. The educational examples do not provide a universal FX trade win rate. chartschool.stockcharts.com ↗
