Overview of Bearish Harami Candlestick Pattern
The Bearish Harami is a notable candlestick pattern in technical analysis that often signals a potential reversal from an uptrend to a downtrend. This pattern, comprising two candlesticks, is considered an indicator of a shift in market momentum from bullish to bearish. Here’s an overview of its key characteristics and implications:
- Formation in an Uptrend: It typically appears during an uptrend, indicating the possibility of a trend reversal.
- First Candlestick: The first candle is a large bullish one, showing strong buying pressure.
- Second Candlestick: The second day features a smaller bearish candle, fully contained within the vertical range of the previous bullish candle’s body.
- Contrast in Size and Color: The pattern is characterized by a contrast between the first large bullish candle and the second smaller bearish candle.
Importance in Technical Analysis
The Bearish Harami candlestick pattern is of considerable importance in technical analysis due to several reasons:
- Trend Reversal Signal: It is often viewed as a potential signal for a bearish reversal, particularly significant when occurring after a sustained uptrend.
- Sentiment Indicator: The Bearish Harami reflects a shift in market sentiment. It indicates that the bullish drive is losing steam and a bearish sentiment might be taking hold.
- Risk Management Tool: Identifying this pattern can help traders manage their risk by signaling when to exit long positions or consider initiating short positions.
- Complements Other Analysis: The Bearish Harami is most effective when used alongside other technical indicators and analysis tools, providing a more holistic view of market conditions.
- Suitable for Multiple Trading Styles: This pattern can be applied in various trading strategies, including swing trading, day trading, and position trading, making it versatile.
Example From Trading View
Defining the Bearish Harami Candlestick Pattern Criteria
The Bearish Harami is a two-candlestick pattern in technical analysis that indicates a potential reversal from bullish to bearish momentum. Here are the defining criteria for the Bearish Harami candlestick pattern:
- Prevailing Trend:
- The pattern should emerge within an uptrend. Its appearance is meaningful as a potential reversal signal in a bullish context.
- First Candlestick:
- Large Bullish Candle: The first candlestick is a large bullish one, reflecting strong buying pressure. This candle typically indicates a continuation of the existing bullish trend.
- Second Candlestick:
- Small Bearish Candle: The second candlestick is smaller and bearish. Importantly, its body is entirely contained within the vertical range of the first candle’s body.
- Positioning: This smaller bearish candle should open and close within the body of the previous day’s bullish candlestick, not just within its high-low range.
- Contrast in Size and Color:
- The visual contrast between the first large bullish candle and the second smaller bearish candle is a critical aspect of this pattern.
Code For Detecting Bearish Harami
//@version=5 indicator("Bearish Harami Detector", overlay=true) // Detecting Bearish Harami pattern isBearishHarami() => bullishCandle = close[1] > open[1] and open[1] < close bearishCandle = close < open sizeWithin = high < high[1] and low > low[1] bullishCandle and bearishCandle and sizeWithin // Plotting the pattern using labels if isBearishHarami() label.new(bar_index,high, "Bearish Harami", style=label.style_label_down, color=color.red, textcolor=color.white, yloc=yloc.abovebar)
Output
Overview of the Script
1. Indicator Declaration
//@version=5 indicator("Bearish Harami Detector", overlay=true)
@version=5
: Indicates that the script uses version 5 of Pine Script.indicator(...)
: Declares a new custom indicator."Bearish Harami Detector"
: The name of the indicator.overlay=true
: The indicator will be plotted directly on the price chart.
2. Bearish Harami Detection Function
isBearishHarami() => bullishCandle = close[1] > open[1] and open[1] < close bearishCandle = close < open sizeWithin = high < high[1] and low > low[1] bullishCandle and bearishCandle and sizeWithin
isBearishHarami()
: A user-defined function that checks for a Bearish Harami pattern.bullishCandle
: Checks if the previous candle is bullish (closing price higher than opening price).bearishCandle
: Checks if the current candle is bearish (closing price lower than opening price).sizeWithin
: Ensures the current candle’s high is lower than the previous candle’s high, and its low is higher than the previous candle’s low.- The function returns
true
if all these conditions are met, indicating a Bearish Harami pattern.
3. Plotting the Pattern
if isBearishHarami() label.new(bar_index, high, "Bearish Harami", style=label.style_label_down, color=color.red, textcolor=color.white, yloc=yloc.abovebar)
- This block of code executes when a Bearish Harami pattern is detected.
if isBearishHarami()
: Checks for the presence of a Bearish Harami pattern.label.new(...)
: Creates a new label on the chart.bar_index
: Specifies the bar index (x-coordinate) for the label.high
: Places the label at the high price of the candle."Bearish Harami"
: The text displayed on the label.style=label.style_label_down
: The label is styled to point downwards.color=color.red
: Sets the label’s color to red.textcolor=color.white
: Sets the text color to white.yloc=yloc.abovebar
: Places the label above the bar.
Frequently Asked Questions
This script is designed to detect and label Bearish Harami candlestick patterns on TradingView charts, signaling potential bearish reversals.
The code is written for Pine Script version 5, the latest version supported by TradingView.
Yes, you can modify the detection criteria by adjusting the conditions within the isBearishHarami()
function in the code.
It places a red label with the text “Bearish Harami” above the bar where the pattern is detected.
No, it’s recommended to use this script as part of a broader trading strategy. Combining it with other technical analysis tools and indicators will provide more reliable signals.
Conclusion
The Bearish Harami Detector script identifies potential bearish reversals. By automatically highlighting Bearish Harami patterns with red labels, it simplifies the process of technical analysis, enhancing the decision-making process. While valuable as a standalone tool, its effectiveness is maximized when integrated into a broader trading strategy, complemented by other technical analysis methods. This script not only aids experienced traders but also serves as a learning aid for those new to candlestick pattern analysis.