Marubozu (CDLMARUBOZU)
Summary
Single candle with a long real body and no/very-short upper and lower shadows, so open and close sit at the range extremes. Bullish (white) or bearish (black) reversal/strength signal per the body color.
Formula
One candle at i. Match when: realbody(i) > BodyLong average AND upperShadow(i) < ShadowVeryShort average AND lowerShadow(i) < ShadowVeryShort average. If matched emit candlecolor(i)*100 (+100 white when close>=open, -100 black when close<open); else 0.
Notes
- Despite the shape's strong-conviction reputation, Bulkowski's testing found a Marubozu continues in its expected direction only about 53% (black) to 56% (white) of the time — both "near random." (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 on a white (bullish) marubozu, -100 on a black (bearish) marubozu, 0 when no pattern. Sign follows the candle color
Output Values
| Value | Meaning |
|---|---|
| -100 | Black marubozu — close near the low with no shadows, signaling strong selling pressure |
| 0 | No pattern |
| 100 | White marubozu — close near the high with no shadows, signaling strong buying pressure |
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: cdlmarubozu.c · cdlmarubozu.yaml
| Native | File |
|---|---|
| C | ta_CDLMARUBOZU.c |
| Rust | cdlmarubozu.rs |
| Java | Core_CDLMARUBOZU.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Marubozu, Shaven Head/Bottom