Harami

haramipatternsForge API 1

A small body inside the previous long body.

Inputs

NameTypeDefaultRange
long_body_pctfloat500 to 100
allow_equalbooltrue

Outputs

NameTypeRequiredDescription
haramieventOptionalcolor_down theme.down, color_up theme.up, shape diamond, style marker, where above_bar
Warm-up
1 bars (1 at the defaults)
Repaints
No
Parity
None

Formula

body = |close - open|, range = high - low, upper wick = high - max(open, close), lower wick = min(open, close) - low

the first body > 0 and >= long_body_pct / 100 * its range; the second body inside the first body (strictly with equal prices off) and smaller than it

Found: 1 when the first bar falls, -1 when it rises

A bar whose high equals its low, or that has a missing price, is never part of a pattern. Computed on the prices the bars are drawn with: on Heikin-Ashi or Renko bars those are the built candles.