Homing Pigeon (CDLHOMINGPIGEON)
Summary
Two-candle pattern: a long black candle followed by a small black candle whose real body sits inside the prior body. A hit signals a bullish reversal, most meaningful in a downtrend, which the code does not verify.
Formula
Two candles at i-1 and i. Both black: close[i-1] < open[i-1] and close[i] < open[i]. First body long: realbody[i-1] > BodyLong average. Second body short: realbody[i] <= BodyShort average. Second body contained by first: open[i] < open[i-1] and close[i] > close[i-1].
Notes
- Does not verify the preceding downtrend that the bullish reversal classically assumes.
- Despite the bullish-reversal label, Bulkowski's testing found this behaves as a bearish continuation 56% of the time — "near random" by his own description — though its overall post-breakout performance rank (21st of 103) is comparatively strong. (thepatternsite.com)
Inputs
inOpen— Open price of each barinHigh— High price of each barinLow— Low price of each barinClose— Close price of each bar
Outputs
outInteger— +100 when the pattern is detected, 0 otherwise. Never emits -100 (always bullish)
Output Values
| Value | Meaning |
|---|---|
| 0 | No pattern |
| 100 | Homing Pigeon detected — a bullish reversal signal, most meaningful after a downtrend (unverified by the function) |
Properties
Numerical Stability: Start-Independent
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ✅ Candlestick i |
| ☐ Can Output NaN or ±Inf |
| ☐ Identity at Period 1 |
Implementation
TA-Lib Definition: cdlhomingpigeon.c · cdlhomingpigeon.yaml
| Native | File |
|---|---|
| C | ta_CDLHOMINGPIGEON.c |
| Rust | cdlhomingpigeon.rs |
| Java | Core_CDLHOMINGPIGEON.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Homing Pigeon