Piercing Line Candlestick Pattern: Midpoint and Gap Rules

A piercing line candlestick pattern is a possible bullish reversal after a decline: a bearish candle is followed by a bullish candle that closes above the midpoint of the first real body. The opening gap matters. TradingView requires an open below the prior low; a pattern without that gap needs a different rule label. The completed shape does not establish that the downtrend has ended.

Key Takeaways

  • The midpoint uses the first open and close. A wick above it does not satisfy a closing-price rule.
  • A strict low-gap pattern and a relaxed continuous-market variant produce different signal sets.
  • Full body engulfing concerns the candle bodies; it does not require engulfing both wicks.
  • An additional confirmation candle introduces delay. Evaluate that tradeoff with specified rules and costs.

Measure the body midpoint before calling the pattern

Use the first candle open and close, not its high and low: midpoint = (first open + first close) / 2. The second close must exceed that value. This page keeps a piercing label only while that close remains below the first open, separating a partial recovery from full body engulfing. A close exactly at the midpoint fails the strict greater-than test.

  • Check for a preceding decline and record how your detector defines it.
  • Require a bearish first candle with a substantial body and a bullish second candle.
  • Specify the opening-gap convention before counting signals.
  • Evaluate the second close after the candle finishes, not from its intrabar high.

An illustrative midpoint calculation

Assume a decline leads into a first candle that opens at 110 and closes at 100, with a low of 99. Its body midpoint is 105. A second candle opening at 98 and closing at 106 meets the strict gap and midpoint tests. The recovery into the first body is (106 - 100) / (110 - 100) = 60%. That percentage measures penetration, not a probability of profit.

Change only the second close; keep its open at 98
Second closeBody recoveryClassification in this example
10440%Below the midpoint; fails
10550%At the midpoint; fails the strict threshold
10660%Piercing line
111110%Full body engulfing; relabel the pattern
Hypothetical piercing line: 106 closes above the 105 midpoint
97106115Prior decline: open 114, high 115, low 109, close 110Prior declineFirst candle: open 110, high 111, low 99, close 100First candleSecond candle: open 98, high 107, low 97, close 106Second candle
OHLC values for Hypothetical piercing line: 106 closes above the 105 midpoint
BarOpenHighLowClose
Prior decline114115109110
First candle11011199100
Second candle9810797106

Hollow bodies close at or above the open. Filled bodies close below the open.

Illustrative OHLC values, not historical prices or a backtest. The first body spans 100 to 110; its midpoint is 105. Earlier trend history is assumed and is not fully shown.

Stocks, forex and crypto: name the gap convention

TradingView and StockCharts publish different opening tests. TradingView specifies an open below the previous low, while StockCharts describes an open below the previous close. A session break on a stock chart can produce either case. On bars within a continuous trading session, the next open may equal the previous close, so a strict gap detector can reject a visually similar recovery. Check the actual OHLC and session setting rather than relaxing the rule silently.

Opening tests with the example first close of 100 and low of 99
ConventionSecond openInterpretation
TradingView strict gapBelow 99Below the entire prior range
StockCharts close gapBelow 100May remain inside the prior range
Custom continuous-market variantAt 100, or within a stated toleranceRemoves the strict gap; test and report separately
  • If using a tolerance, state its unit and maximum value, such as one minimum price tick.
  • Keep symbol, timeframe and regular or extended session settings fixed when comparing detections.
  • A forex or crypto label does not waive the selected gap condition.

Piercing line versus bullish engulfing

The distinction is how much of the first real body the second candle covers. In the example, a 106 close recovers part of the 100-to-110 body; a 111 close covers it fully when paired with the 98 open. Bullish engulfing does not require the second high and low to engulf the first wicks. Classifying the shape does not establish which pattern has a better trading expectancy.

Separate pattern completion from trade confirmation

An unfinished second candle can rise above the midpoint and then close below it. Waiting for its closing update fixes that particular ambiguity. Requiring a later candle to close above the second high is an additional strategy condition: it delays the decision and can change the entry price. It is not part of the two-candle shape and does not guarantee a successful reversal.

  • Illustrative research rule: after the example closes at 106, require the next candle to close above 107; otherwise skip the setup.
  • Illustrative invalidation: cancel that setup if price trades below the two-candle low of 97 before the confirmation close.
  • If both levels are crossed within one historical bar, OHLC alone may not reveal the order. Specify how the test handles that case.
  • For a strategy test, define the fill timing, exit, sizing, spread, commissions and slippage separately. A stop level is not a guaranteed fill price.

Pineify next step

Turn your chosen definition into inspectable rules

Use Pineify AI Coding Agent to draft a detector with a penetration threshold, gap mode, trend filter and closed-candle requirement. Compare its labels with the worked example and near misses before using it. The Visual Editor offers a separate route for combining available conditions; custom gap variants may require generated code. This page explains the pattern and does not scan live markets.

Educational information, not investment advice. All numerical examples are hypothetical. A candlestick pattern can fail, and trading can result in losses. A historical test does not guarantee future results.

Frequently Asked Questions