Three Advancing White Soldiers (CDL3WHITESOLDIERS)
Summary
A three-candle pattern of consecutive white candles with progressively higher closes, each opening within/near the prior body and each with a very short upper shadow. A hit is a bullish reversal signal, most meaningful in a downtrend, which the code does not verify.
Notes
- Does not verify the prior downtrend the pattern classically assumes for significance.
- Bulkowski's testing found this reverses a downtrend 82% of the time, but cautions the high rate mostly reflects how rare downward breakouts are afterward — moves following an upward breakout perform poorly. (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 detected, 0 otherwise; never negative (three white soldiers is always bullish)
Output Values
| Value | Meaning |
|---|---|
| 0 | No pattern |
| 100 | Three White Soldiers detected — a bullish reversal signal, most meaningful after a downtrend (unverified by the function) |
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: cdl3whitesoldiers.c · cdl3whitesoldiers.yaml
| Native | File |
|---|---|
| C | ta_CDL3WHITESOLDIERS.c |
| Rust | cdl3whitesoldiers.rs |
| Java | Core_CDL3WHITESOLDIERS.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Three Advancing White Soldiers, Three White Soldiers