CDLSEPARATINGLINES
CDLSEPARATINGLINES
Summary
A two-candle continuation pattern: the second candle opposes the first in color, opens at the same price as the first, and is a long-bodied belt hold. Bullish (white second candle) or bearish (black second candle) continuation signal. Trend continuation: +100 = bullish (white belt hold), -100 = bearish (black belt hold).
Formula
Two consecutive candles i-1, i: (1) opposite colors: color(i-1) == -color(i); (2) same open: open[i-1]-Equal_avg <= open[i] <= open[i-1]+Equal_avg; (3) long body: realbody(i) > BodyLong_avg; (4) belt hold: if i is white, lowershadow(i) < ShadowVeryShort_avg; if i is black, uppershadow(i) < ShadowVeryShort_avg.
Notes
- A prior trend is not verified, nor that the pattern aligns with it.
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 bullish (white second candle) hit, -100 for a bearish (black second candle) hit, 0 otherwise
Properties
Numerical Stability: Start-Independent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ✅ Candlestick i |
Implementation
TA-Lib Definition: cdlseparatinglines.c · cdlseparatinglines.yaml
| Native | File |
|---|---|
| C | ta_CDLSEPARATINGLINES.c |
| Rust | cdlseparatinglines.rs |
| Java | Core_CDLSEPARATINGLINES.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Separating Lines
See Also
CDLBELTHOLD · CDLMEETINGLINES