Skip to content
All library documents

Detecting Bullish and Bearish Harami Candlestick Patterns

Article ProRealCode

Summary

The document describes a simple two-candle rule for labeling bullish and bearish Harami patterns. It compares the prior candle’s open and close with the current candle’s open and close: a bearish prior candle followed by a bullish candle whose body lies within the prior body produces a bullish label, while the reverse color sequence produces a bearish label. All other cases receive a neutral value.

The explanation also says to consider where the second candle sits within the first candle’s range, but the provided conditions check candle body relationships and do not classify the second candle as high, middle, or low within that range. No market data, performance results, or trading rules for acting on the labels are supplied. The pattern detector is therefore a signal-identification example, not evidence that Harami signals predict reversals or a complete strategy. Its use would require specifying data conventions and testing the signal in the intended market and timeframe.

Key ideas

  • The detector uses the direction and open-close relationship of two consecutive candles to identify Harami patterns.
  • A bullish label follows a bearish candle when the next candle is bullish and its body is inside the prior body.
  • A bearish label follows a bullish candle when the next candle is bearish and its body is inside the prior body.
  • The supplied rules do not implement the stated positional classification of the second candle within the prior range.
  • The document provides no performance evidence or rules for trading the detected patterns.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.