Upside/Downside Gap Three Methods (CDLXSIDEGAP3METHODS)
Summary
A three-candle continuation pattern: two same-color candles separated by a real-body gap, followed by an opposite-color candle that fills into the gap. Bullish (upside) when the first two candles are white, bearish (downside) when they are black.
Notes
- This continuation pattern does not verify the prior trend it classically assumes; the caller must confirm the trend.
- Bulkowski's testing found BOTH directions of this pattern actually act as reversals more often than not, opposite the classic continuation label: the upside variant reverses bearish 59% of the time, the downside variant reverses bullish 62% of the time. (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 two same-color candles are white (bullish/upside continuation), -100 when black (bearish/downside continuation), 0 otherwise. Equals candlecolor(1st candle) * 100
Output Values
| Value | Meaning |
|---|---|
| -100 | Downside Gap Three Methods: the first two candles are black — bearish continuation |
| 0 | No pattern |
| 100 | Upside Gap Three Methods: the first two candles are white — bullish continuation |
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: cdlxsidegap3methods.c · cdlxsidegap3methods.yaml
| Native | File |
|---|---|
| C | ta_CDLXSIDEGAP3METHODS.c |
| Rust | cdlxsidegap3methods.rs |
| Java | Core_CDLXSIDEGAP3METHODS.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Upside/Downside Gap Three Methods, Upside Gap Three Methods, Downside Gap Three Methods