Tasuki Gap (CDLTASUKIGAP)
Summary
A three-candle pattern: a real-body-gapping candle followed by an opposite-color candle that opens inside its body and closes back into the gap without filling it. An upside gap is a bullish continuation signal; a downside gap is a bearish continuation signal.
Notes
- This continuation pattern does not verify the prior trend it classically assumes; the caller must confirm the trend.
- Bulkowski's testing found the downside Tasuki Gap actually acts as a bullish REVERSAL 54% of the time — opposite its textbook bearish-continuation label — while the upside variant does continue as labeled, but only 57% of the time ("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 bullish (upside-gap) tasuki gap, -100 on a bearish (downside-gap) tasuki gap, 0 otherwise. Sign equals the color of the gap candle i-1 (candlecolor(i-1)*100)
Output Values
| Value | Meaning |
|---|---|
| -100 | Bearish (downside-gap) Tasuki Gap |
| 0 | No pattern |
| 100 | Bullish (upside-gap) Tasuki Gap |
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: cdltasukigap.c · cdltasukigap.yaml
| Native | File |
|---|---|
| C | ta_CDLTASUKIGAP.c |
| Rust | cdltasukigap.rs |
| Java | Core_CDLTASUKIGAP.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Tasuki Gap, Upside/Downside Tasuki Gap