CDLSPINNINGTOP
CDLSPINNINGTOP
Summary
Single-candle pattern: a small real body with both an upper and a lower shadow longer than the body. Signals indecision; the code does not classify it as bullish or bearish. A hit marks indecision (small body, both shadows long); the sign only reports candle color, not direction.
Formula
One candle where: upper shadow > real body AND lower shadow > real body AND real body < the BodyShort average. The BodyShort average is the factor-scaled mean body over the prior avgPeriod candles.
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 candle is white (close>=open), -100 when black (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: cdlspinningtop.c · cdlspinningtop.yaml
| Native | File |
|---|---|
| C | ta_CDLSPINNINGTOP.c |
| Rust | cdlspinningtop.rs |
| Java | Core_CDLSPINNINGTOP.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Spinning Top