Long Legged Doji (CDLLONGLEGGEDDOJI)
Summary
Single-candle doji (open ~ close) with at least one long shadow. Signals market indecision, not a directional bias. Marks indecision/uncertainty; not inherently bullish or bearish despite the positive sign.
Formula
One candle. Hit when: real body <= BodyDoji average (doji body) AND (lower shadow > ShadowLong average OR upper shadow > ShadowLong average), i.e. at least one long shadow.
Notes
- Only one long shadow (upper or lower) is required, whereas the classic pattern shows both long upper and lower shadows.
- Bulkowski's testing found this continues in the direction of the prior trend only 51% of the time — statistically random — and ranks 37th of 103 patterns overall; in his words, "it means nothing." (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 when the pattern is present, 0 otherwise. Only +100 is emitted; the code never emits -100, and the positive sign does NOT mean bullish
Output Values
| Value | Meaning |
|---|---|
| 0 | No pattern |
| 100 | Long-legged doji detected — signals market indecision, not a directional (bullish/bearish) bias |
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: cdllongleggeddoji.c · cdllongleggeddoji.yaml
| Native | File |
|---|---|
| C | ta_CDLLONGLEGGEDDOJI.c |
| Rust | cdllongleggeddoji.rs |
| Java | Core_CDLLONGLEGGEDDOJI.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Long Legged Doji
See Also
CDLDOJI · CDLGRAVESTONEDOJI · CDLDRAGONFLYDOJI · CDLRICKSHAWMAN