Modified Hikkake Pattern (CDLHIKKAKEMOD)
Summary
A four-candle pattern: two successively narrower inside bars, then a breakout bar, with the second candle closing near one extreme of its range. Bullish or bearish reversal signal. Bullish (+) or bearish (-) reversal; per the code's note it is significant in a downtrend (bull) or uptrend (bear), context the code does not verify.
Notes
- Does not verify the prior trend (downtrend for bullish, uptrend for bearish) that this reversal pattern assumes.
- A bar that is both a new setup and the confirmation of an earlier one reports the new setup; the earlier one ends unconfirmed.
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 bullish hikkake bar, -100 bearish; +200 confirmed bullish, -200 confirmed bearish; 0 otherwise
Output Values
How to read these values from the output's flags: rW7.
| Value | Meaning |
|---|---|
| -200 | Bearish Modified Hikkake confirmed: within 3 bars, a close below the last inside bar's low confirms the reversal lower |
| -100 | Bearish Modified Hikkake — a false upside breakout traps buyers, warning that the uptrend may be topping out |
| 0 | No pattern on this bar; a setup may still be awaiting confirmation |
| 100 | Bullish Modified Hikkake — a false downside breakout traps sellers, warning that the downtrend may be bottoming out |
| 200 | Bullish Modified Hikkake confirmed: within 3 bars, a close above the last inside bar's high confirms the reversal higher |
Properties
Numerical Stability: Start-Independent
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ✅ Candlestick i |
| ☐ Can Output NaN or ±Inf |
| ☐ Identity at Period 1 |
| ☐ Display Shift |
| ☐ Uses Transcendental |
| ☐ Input Must Be Positive |
Implementation
TA-Lib Definition: cdlhikkakemod.c · cdlhikkakemod.yaml
| Native | File |
|---|---|
| C | ta_CDLHIKKAKEMOD.c |
| Rust | cdlhikkakemod.rs |
| Java | Core_CDLHIKKAKEMOD.java |
| C# | Core_CDLHIKKAKEMOD.cs |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Modified Hikkake, Modified Hikkake Pattern