Three-Line Strike (CDL3LINESTRIKE)
Summary
A four-candle pattern: three same-color candles with consecutively higher (or lower) closes, each opening within or near the prior real body, then a fourth opposite-color candle that opens beyond the third close and closes past the first candle's open. TA-Lib emits a signed continuation-style signal keyed to the color of the first three candles, traditionally read as significant only inside a trend matching those three candles.
Notes
- Does not verify the surrounding trend the pattern classically assumes for significance.
- TA-Lib's sign follows the classic continuation reading. Thomas Bulkowski's statistical study of the pattern (Encyclopedia of Candlestick Charts) found the opposite in practice — it acted as a reversal far more often than a continuation — so traders who follow his research read this pattern's signal in the opposite direction from what its sign here suggests.
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 for a white (rising) three-line strike, -100 for a black (falling) three-line strike, 0 otherwise. Sign is the color of the first three candles: candlecolor(i-1)*100
Output Values
| Value | Meaning |
|---|---|
| -100 | Bearish Three-Line Strike — three falling candles abruptly erased by one strong reversal bar; classically read as a bearish continuation despite the apparent reversal |
| 0 | No pattern |
| 100 | Bullish Three-Line Strike — three rising candles abruptly erased by one strong reversal bar; classically read as a bullish continuation despite the apparent reversal |
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: cdl3linestrike.c · cdl3linestrike.yaml
| Native | File |
|---|---|
| C | ta_CDL3LINESTRIKE.c |
| Rust | cdl3linestrike.rs |
| Java | Core_CDL3LINESTRIKE.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Three-Line Strike, 3-Line Strike