All indicators

Price Action Doji Harami v0.2

Sep 8, 2016

Static chart image
SignalsCandlestickPatterns

The Price Action Doji Harami v0.2 indicator identifies specific Harami and Doji candlestick patterns to highlight potential trend reversals or pullbacks in price action.

Usage

The script is designed to detect four distinct patterns based on candle body size and wick proportions relative to the preceding trend:

  • Bearish Harami: Formed after 1–3 large bullish candles, followed by a small or virtually non-existent red/neutral body with long wicks.
  • Bullish Harami: Formed after 1–3 large bearish candles, followed by a small or neutral green body with long wicks.
  • Bearish Doji: Formed after 1–3 large bullish candles, followed by a small green candle with wicks representing at least 60% of the total candle range.
  • Bullish Doji: Formed after 1–3 large bearish candles, followed by a small red candle with wicks representing at least 60% of the total candle range.

Users can use these signals to identify exhaustion in an current trend. The tool also features a toggle to use Heikin Ashi calculations while viewing standard candlestick charts, providing a smoother perspective on price action trends and reversals.

Details

This tool distinguishes between true Harami patterns (where the current candle is contained within the previous candle's body) and standard Doji patterns. The detection logic relies on a "Min % of Range" calculation for wicks to ensure the signal candle represents true indecision. By adjusting the "Number of Lookback Bars," the indicator ensures that the detected reversal pattern is preceded by a consistent move in one direction.

Settings

  • Doji, Min % of Range of Candle for Wicks: Sets the minimum percentage of the total candle height that must be composed of wicks for a bar to be considered a Doji.
  • Doji, Previous Candle Min Pip Body Size: Sets a minimum size requirement (in pips) for the candles leading up to the pattern. Setting this to 0 removes the size constraint.
  • Show Price Action Bar Names: Toggles the text labels ("Bearish Harami", etc.) above or below the bars.
  • Highlight Harami & Doji Bars: Enables circular highlights on the bars where patterns are detected.
  • Show Only Harami Style Doji's: Filters the output to only display true Harami-style patterns.
  • Generate Alert for Harami & Doji Bars: Enables the internal alert logic and displays a confirmation circle at the bottom of the pane.
  • Use Heikin Ashi Candles for Calculations: When enabled, the indicator calculates all patterns using Heikin Ashi values, regardless of the chart type.
  • Doji, Number of Lookback Bars: Determines how many preceding candles (1–3) must be the same color to qualify the trend for a reversal signal.

FAQ

How do I access Price Action Doji Harami v0.2?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

What is the difference between a Harami and a Doji in this script?

In this script, a Harami is defined as a reversal candle that is small enough to fit within the previous candle's body, while a Doji is defined by its wick-to-body ratio (minimum 60% wicks).

Can I use this on regular Japanese Candlestick charts?

Yes, you can apply this to regular charts. If "Use Heikin Ashi Candles for Calculations" is checked, it will find patterns based on HA math while showing them on your standard price bars.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.