CDLHARAMI
CDLHARAMI
Summary
Two-candle pattern: a long real body followed by a short real body contained within the first candle's real body. A reversal signal whose direction is the opposite of the first candle's color. A hit signals a potential reversal opposite the 1st candle: positive (black 1st) is bullish, negative (white 1st) is bearish.
Notes
- Does not verify the prior trend (downtrend for bullish, uptrend for bearish) that the reversal signal assumes.
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/+80 when the long 1st candle is black (bullish), -100/-80 when it is white (bearish), 0 otherwise; 80 when the two real bodies share an end, 100 when the 1st body strictly overhangs both ends of the 2nd
Properties
Numerical Stability: Start-Independent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ✅ Candlestick i |
Implementation
TA-Lib Definition: cdlharami.c · cdlharami.yaml
| Native | File |
|---|---|
| C | ta_CDLHARAMI.c |
| Rust | cdlharami.rs |
| Java | Core_CDLHARAMI.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Harami, Harami Pattern