Mat Hold (CDLMATHOLD)
Summary
A five-candle bullish continuation pattern: a long white candle, an upside real-body-gapped small black candle, two more small falling candles that hold within the first body, and a final white candle closing above the reaction days' highs. Signals continuation of the prior uptrend. Hit = bullish continuation of the existing uptrend.
Notes
- The colors of the third and fourth (reaction) candles are not checked, although they are classically black.
- The continuation reading assumes a prior uptrend, which is not verified.
- Bulkowski's own dataset contains only 52 Mat Hold occurrences out of 4.7 million candle lines; he explicitly warns the 78% continuation rate he measured "will likely be wrong or at least subject to large change as additional samples become available." (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 bullish Mat Hold is detected, 0 otherwise. Never emits -100
Output Values
| Value | Meaning |
|---|---|
| 0 | No pattern |
| 100 | Mat Hold detected — bullish continuation signal |
Parameters
| Parameter | Type | Default | Accepted values | Description |
|---|---|---|---|---|
optInPenetration | real | 0.5 | ≥ 0 | Max fraction of the 1st white body the reaction days (3rd, 4th) may penetrate |
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: cdlmathold.c · cdlmathold.yaml
| Native | File |
|---|---|
| C | ta_CDLMATHOLD.c |
| Rust | cdlmathold.rs |
| Java | Core_CDLMATHOLD.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Mat Hold