Skip to content
All library documents

Detecting Pin Bars from Candle Range and Wick Position

Article ProRealCode

Summary

This note describes a simple candlestick rule for flagging bearish shooting stars and bullish hammers. It first requires the high-to-low range to exceed twice the absolute distance between open and close, identifying candles with relatively small bodies. It then checks whether either the open or close is near the low to mark a shooting star, or near the high to mark a hammer. Candle color is ignored; classification depends on wick placement and size.

The author says the indicator was written to test a strategy and that the strategy failed, while distinguishing that result from the indicator code itself. No market, sample, performance statistics, or validation method is provided, so the note explains a pattern-detection heuristic rather than evidence that pin bars predict returns. The thresholds are fixed and may need testing across instruments and timeframes.

Key ideas

  • The rule first requires the candle range to be more than twice the absolute body size.
  • A shooting star is flagged when the open or close lies near the candle low.
  • A hammer is flagged when the open or close lies near the candle high.
  • The detector ignores candle color and uses wick geometry.
  • The author reports failure of the tested strategy but gives no validation details.

Tags

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