In this article
After this article, you can
- Distinguish a temporary candle body from a closed body.
- Test engulfing using both body prices rather than a wick alone.
Terms at hand: Backtesting · Order execution · Trading Plan · Balance · Break-Even · Stop loss
Engulfing compares the bodies of two consecutive candles. It need not cover their complete high–low ranges. Distinguish a body-engulfing test from an outside bar, and state how equal boundary prices are handled: different detectors can classify the same OHLC differently. The hypothetical models below explain geometry rather than promise a reversal.
Body, range and candle direction
Let O, H, L and C denote open, high, low and close. The body lies between the smaller and larger of O and C; its length is |C − O|. The full range is H − L. A body can engulf another while its high and low remain inside the previous range, and an outside bar can have a smaller internal body.
Read direction from prices rather than preset colors: C > O is up and C < O is down. Our strict exercise excludes O = C so the directions are unambiguous; do not assume every detector uses that same doji policy. A bullish reversal interpretation needs a preceding downward context, but that context is separate from the body inequalities.
Body engulfing without an outside bar
Use hypothetical EUR/USD with one pip = 0.0001 USD per EUR. Candle 1 has O/H/L/C = 1.1050/1.1070/1.1010/1.1030. Alternative following candle 2A has 1.1028/1.1060/1.1020/1.1052; alternative 2B has 1.1035/1.1080/1.1000/1.1045. Both alternatives follow the same candle 1; they are not consecutive candles in one series.
| Measurement | 1 | 2A | 2B |
|---|---|---|---|
| Body direction | Down | Up | Up |
| Body length | 20 pips | 24 pips | 10 pips |
| High–low range | 60 pips | 40 pips | 80 pips |
| Strict body engulfing | Reference | Yes | No |
| Strict outside bar | Reference | No | Yes |
In 2A, O2 is 2 pips below C1 and C2 is 2 pips above O1, yet the whole second range stays inside the first. In 2B, H2 exceeds H1 by 10 pips and L2 is 10 pips lower, while its body stays inside the first body. These are different tests, with no automatic ranking of trading performance.
For a separate hypothetical bearish pair, set O1 = 1.2000, C1 = 1.2020, O2 = 1.2022 and C2 = 1.1998. The first up body is 20 pips and the second down body 24 pips. The second opens 2 pips above C1 and closes 2 pips below O1, passing the chosen strict boundaries. No highs, lows or future outcome are inferred from those four prices.
OHLC records extrema and endpoints, not whether the high occurred before the low, how long prices stayed there, or which bank traded. Opposite bodies do not prove a particular order-flow mechanism. A completed pattern and an intrabar observation are also different records, as the diagram shows.
Equality changes the detector result
Keep candle 1 fixed. Original 2A has O2 = 1.1028 and C2 = 1.1052, so both body edges extend beyond it. If O2 becomes 1.1030 while C2 stays 1.1052, the strict test fails at the lower equality. A detector allowing one matching edge can still mark it. If O2 = 1.1030 and C2 = 1.1050, both edges match and there is no enlargement under the selected tests.
Read TA-Lib v0.6.4 and the current template permit one matching edge and return signed 100 or 80; the body tests do not contain a prior-trend filter. TradingView documents separate trend settings, but its help page does not expose every internal size or equality test. Compare the implementation, version and settings before expecting identical markers.
An engulfing body that vanished before the close
Candle one is closed. Candle two is shown twice: when current price is 106 and after its final close at 104.
Scroll sideways to see the full diagram
Entry rules, stop loss placement and profit targets
Recognizing geometry is not a complete strategy. Record instrument, interval, quote type and feed, candle time boundaries, detector version, equality policy, trend filter and raw OHLC. The selected signal must be available before an order is evaluated. Evaluate all qualifying observations, including those with no later reversal.
- After-close market order. A complete candle can be used for recognition, but a historical next open is not a guaranteed executable price.
- Stop entry beyond an extreme. Specify side, trigger, buffer and cancellation. An additional price condition does not guarantee continuation.
- Limit entry on a pullback. Specify price and expiry and retain unfilled observations. A preferred price can remain unfilled; no universal “best” choice follows from the pattern.
A strategy may choose a stop beyond an extreme, but neither a fixed 5–10-pip buffer nor the body test guarantees its suitability. Size and costs must be defined separately. An ordinary stop can execute away from its level; a stopped position alone does not prove that somebody deliberately hunted it.
Price levels, Fibonacci measurements or trailing rules can be hypotheses for an exit. State the exact rule before testing instead of assuming a normal 2:1 or 3:1 payoff. Moving a stop to the entry price does not ensure financial break-even after costs or slippage. Scaling out requires explicit allocation and changes the distribution of outcomes.
A separate hypothetical price-distance calculation
These prices are invented for arithmetic; no Tuesday, Wednesday, seven-day gain, repeated resistance test or RSI history is supplied. With an assumed GBP10,000 position, one pip is USD1, so the planned adverse distance corresponds to USD142 before costs. It is not a maximum loss or EUR amount. Another account currency requires a stated conversion; partial fills and fees can change the outcome.
Time boundaries can change geometry on the same samples
Exchange-traded futures report traded contracts, whereas OTC tick volume counts quote-feed activity. Tick volume is not monetary turnover. Its relationship with traded volume depends on the feed, instrument, session and sample; a universal correlation of 0.9 is not established here.
Take hypothetical samples at 12:59, 13:00, 13:01, 13:02 and 13:03 with prices 101, 102, 100, 99 and 103. Two-minute windows include their left boundary and exclude the right. For [13:00,13:02) then [13:02,13:04), first and last samples give O/C = 102/100 then 99/103: strict bullish engulfing. For [12:59,13:01) then [13:01,13:03), they give 101/102 then 100/99: no bearish engulfing because 100 is not above 102.
These are different two-bar intervals within the same sample stream, not a complete market tick history. Merely changing the displayed timezone need not rebuild bars; an aggregation-boundary change is required for this model. Compare actual time boundaries and sample completeness as well as prices. A chosen volume threshold is an additional hypothesis, not proof of bank participation or a universal performance filter.
Practical takeaway: Evaluate an engulfing rule after the required candle closes; a temporary reading during formation is not its final state.
The most common mistakes in trading the engulfing
Detector differences can be explained without a profit story. Check geometry, equality, availability and data boundaries first, then assess a separately stated strategy on consistent inputs.
- Body versus range. Compare O/C for engulfing and H/L for a separately defined outside-bar test.
- Closed versus live. A current body can pass and then fail by the close; record which state the rule requires.
- Equality and precision. A displayed 1.1030 may hide more digits. Use the raw input precision and fixed boundary policy.
- Settings and evidence. A trend or volume filter can change counts, but its name or a “strong” marker does not establish net efficacy. Preserve all qualifying observations.
Summary — what to do in practice
A body-engulfing classification and an outside bar test different price intervals. Our exercise excludes doji and requires opposite directions with both body edges exceeded strictly. One-edge equality can be accepted by another detector. A prior-trend condition is separately specified; its absence does not erase the raw body inequalities.
The read TA-Lib output ±100 or ±80 is a geometry code, not a probability. TradingView’s trend settings demonstrate why two tools can mark different populations without changing the underlying candles. No universal best timeframe or equity-to-FX success percentage is established by these definitions.
Record recognition time and keep a temporary body distinct from final OHLC. The diagram’s two green drawings are states of one candle, not two events. Maximum 106 does not replace final close 104 when the previous upper body edge is 105.
For a trading claim, define entry, cancellation, exits, size, costs and execution separately. Evaluate the complete qualifying sample and unused data rather than retrospectively choose the most attractive location. Definitions document recognition; they do not guarantee a future reversal or limit actual loss.
Related reading: Japanese candlesticks — the basics compares the OHLC components; pin bar reversal — a single-candle shape discusses another geometry; how to draw support and resistance helps specify a context condition before evaluating results.
Check your understanding
One short exercise
About 2 min · you can try again
Candle two temporarily reached 106 but closed at 104. The previous bearish body is 103–105. What does a strict closed-body engulfing rule record?
- Engulfing because the second wick reached 106.
- No engulfing at close; the temporary reading met the condition.
- Two consecutive signals from two green candles.
Check the answer and explanation
No engulfing at close; the temporary reading met the condition.
The final 102–104 body does not cover 105. Earlier 106 can be recorded as an intrabar state without treating it as final C.
Frequently asked
How does the engulfing pattern differ from an outside bar?
Engulfing tests the body between O and C; the selected strict outside-bar test uses H2 > H1 and L2 < L1. Neither implies the other. In the worked 2A alternative, a 24-pip body covers the previous 20-pip body while its full range stays inside. In 2B, the range extends 10 pips past both prior extremes but the 10-pip body remains inside. Those definitions do not establish a stronger trading signal.
Does the engulfing pattern require opposite candle colours?
Our strict exercise requires opposite directions and excludes O = C. Use C versus O, since colors are configurable. For bullish engulfing it requires O2 < C1 and C2 > O1; reverse those inequalities and directions for bearish. Other implementations may use different doji or equality policies. The read TA-Lib code permits one matching body edge and does not independently test the preceding trend.
What is the most common mistake when trading the engulfing pattern?
Check whether the rule uses final OHLC or a temporary state. The diagram’s second candle briefly has a body 102–106 that covers 103–105, but closes at 104: final 102–104 does not cover 105. It is the same candle shown twice, not two signals. Also preserve raw price precision, candle boundaries, settings and equality policy before comparing detector counts. Geometry supplies no mandatory stop buffer.
Does engulfing work equally well on stocks, commodities and currency pairs?
Recognition definitions and measured trading performance are different questions. State instrument, feed, interval, grouping boundaries, detector version and trend filter. Define entry, exit, size, costs and execution, then evaluate all qualifying observations and unused data. No universal H4 threshold or stock-market success rate for all FX is established here. TA-Lib outputs 100/80 are classification codes, not probabilities.
Sources & bibliography
-
Steve Nison Japanese Candlestick Charting Techniques · Nison's educational website describes his work introducing Japanese candlestick charting to Western audiences. candlecharts.com ↗
-
Thomas N. Bulkowski Encyclopedia of Candlestick Charts — Bullish Engulfing · Material on bullish engulfing from Bulkowski's candlestick-pattern analysis, associated with his 2008 Wiley book. thepatternsite.com ↗
-
Greg Morris Candlestick Charting Explained · McGraw-Hill, third edition, 2006; explains candlestick-charting methods. www.mhprofessional.com ↗
-
TradingView Engulfing — Bullish · Distinguishes body engulfing from the complete high–low range and documents optional trend filters. Used for recognition scope, without treating those definitions as a universal success rate or execution rule. www.tradingview.com ↗
-
TradingView Engulfing — Bearish · Documents the opposite-direction body pattern and separate trend settings. The lesson makes its own strict boundary convention explicit and compares it with equality-permitting detection. www.tradingview.com ↗
-
TA-Lib CDLENGULFING implementation, version 0.6.4 · Pinned code permits one matching body edge and returns signed 100/80 geometry codes, with no prior-trend test. The lesson checks these inequalities arithmetically; no native-library backtest or probability estimate is asserted. raw.githubusercontent.com ↗
