CDLSHORTLINE
CDLSHORTLINE
Summary
Single-candle pattern: a short real body with short upper and lower shadows (a small-range candle). Not a directional signal — the output sign encodes candle color, not bullish/bearish sentiment. A hit only flags a small-range candle; the +/- sign is the candle's color (white/black), not a reversal or continuation call.
Formula
One candle at i, all three:
- short real body: real body < the BodyShort average
- short upper shadow: upper shadow < the ShadowShort average
- short lower shadow: lower shadow < the ShadowShort average
If matched: output = candle color * 100 (+100 white, -100 black); else 0.
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 matching white candle (close>=open), -100 for a matching black candle (close<open), 0 when no pattern. Sign is candle color, NOT bullish/bearish
Properties
Numerical Stability: Start-Independent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ✅ Candlestick i |
Implementation
TA-Lib Definition: cdlshortline.c · cdlshortline.yaml
| Native | File |
|---|---|
| C | ta_CDLSHORTLINE.c |
| Rust | cdlshortline.rs |
| Java | Core_CDLSHORTLINE.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Short Line Candle, Short Line