Three inside up: body containment and the third close
Three inside up combines a bearish first body, a smaller body contained within it, and a bullish third candle closing above the first open. It is commonly studied as a bullish reversal candidate after a decline. This guide uses a bullish second candle as an additional choice and separates prior trend, body-size thresholds and trade execution from the completed shape.
Key Takeaways
- The third close must exceed the first open under the definition used here; exceeding only the first close is insufficient.
- Containment compares real bodies, not full high-low ranges.
- TA-Lib does not require the second body to be bullish; this guide states that additional restriction explicitly.
- The third close completes the pattern but does not establish a fill or subsequent profit.
- No universal best timeframe, measured win rate or volume-based reliability is established here.
State the definition and the implementation differences
TA-Lib CDL3INSIDE uses strict containment of the second body, relative long/short body tests, and a third candle opposite to the first that closes beyond the first open. It does not impose a color test on the middle body or a prior-trend test in that function. Therefore a bullish-middle or prior-decline requirement is an extra condition, not a faithful claim about its output.
- For this illustrative bullish version, require candle 1 to close below its open and candle 2 to close above its open.
- Require candle 1 close < candle 2 open < candle 2 close < candle 1 open. Boundary equality fails this strict version.
- Require candle 3 close > candle 3 open and candle 3 close > candle 1 open.
- For the example only, call a body long when it exceeds 3 price units and short when it is no more than 2. These fixed limits do not reproduce TA-Lib candle settings.
- For a reversal study, define the preceding decline using bars before candle 1, separately from these three-bar conditions.
Work through a hypothetical sequence
Assume a decline before the sequence. Candle 1 has a body of 6, candle 2 a bullish body of 1, and candle 3 a bullish body of 6. The middle body from 102 to 103 is strictly within 100 to 106. The third close of 107 exceeds the first open of 106, so this example passes the stated rules.
| Bar | Open | High | Low | Close |
|---|---|---|---|---|
| 1 | 106 | 107 | 99 | 100 |
| 2 | 102 | 104 | 101 | 103 |
| 3 | 101 | 108 | 100.5 | 107 |
- The second open is above the first close. A gap down below 100 would fail full body containment in this bullish-middle version.
- The middle wick limits are not part of the body-containment test. A low of 98 with the same middle open and close would not, by itself, invalidate that test.
- The third candle may complete the pattern even if its close stays below a separately chosen resistance level. Recognition and room to trade are different questions.
Use counterexamples to test the boundaries
Keep the table as the starting sequence and make only the stated substitutions. All these alternatives retain valid OHLC values. They distinguish a completed third bar from a candle that merely moves upward.
| Change | Result under this guide | Reason |
|---|---|---|
| Candle 3 closes at 105 | Reject | 105 exceeds the first close 100 but not its open 106. |
| Candle 3 closes at 106 | Reject | Equality does not satisfy the strict completion rule. |
| Candle 2 opens at 100, with low lowered to 100 | Reject | The second body touches the first body boundary. |
| Candle 2 opens at 103 and closes at 102 | Reject this bullish-middle version | The middle body is contained but bearish; TA-Lib has no such middle-color restriction. |
| After the original completion, a later bar closes below 99 | Completed shape followed by failure | The later decline does not erase the three-bar event. |
Add an execution model rather than a success claim
Wait for candle 3 to close before recording the final pattern. A strategy order created at that close normally fills on the next available tick under TradingView default settings, often the next bar open. A stop order above the third high and a next-open market order are different entry rules and can produce different trades.
- For arithmetic only, assume a fill at 107.5 and an exit trigger at 98.9. The planned risk distance is 8.6. A target two times that distance above entry is 124.7; neither fill nor target is guaranteed.
- Fix the order type, exit, position size, dates and fees before evaluating outcomes. Include adverse execution assumptions.
- An RSI or volume condition changes the sample. It cannot establish that buying is institutional or that a reversal is genuine.
- Compare the three-bar rule with the two-bar harami on the same data and outcome definition. Do not assume more candles necessarily mean greater profitability.
- Report failed patterns and unfilled orders as well as successful examples, then evaluate selected settings on a separate period.
Sources and verification
This page is for informational purposes only and does not constitute investment advice. Trading stocks, forex, and crypto carries substantial risk of loss. Past performance does not guarantee future results. Always consult a qualified financial advisor before making trading decisions.