Home » Candlestick Patterns » Detecting Bearish Belt Hold Candlestick Pattern in Pine Script

Detecting Bearish Belt Hold Candlestick Pattern in Pine Script

Photo of author
Published on

Overview of Bearish Belt Hold Candlestick Pattern

The “Bearish Belt Hold” candlestick pattern is a significant bearish reversal indicator typically emerging during an uptrend. It is characterized by a long, bearish candle that opens at its high and closes near its low with little or no upper shadow.

Bearish Belt Hold Candlestick Pattern

This pattern suggests a sudden and strong shift in market sentiment from bullish to bearish, often signaling the start of a downward price movement. The lack of an upper shadow indicates that sellers took control from the opening and dominated the trading session. Traders typically view this pattern as a warning to exit long positions or consider short positions, especially when it is confirmed by subsequent bearish candles or other bearish indicators.

Importance in Technical Analysis

The Bearish Belt Hold candlestick pattern holds notable importance in technical analysis for several reasons:

  1. Strong Reversal Signal: It is considered a strong indicator of a bearish reversal, especially when it appears during an uptrend, signaling a potential shift in market sentiment from bullish to bearish.
  2. Early Warning Sign: The pattern often serves as an early warning for traders, indicating a significant change in market dynamics and the potential for a downward price movement.
  3. High Reliability: Due to its distinct formation – a long bearish candle with no or a small upper shadow – the Bearish Belt Hold is relatively easy to identify and is considered reliable.
  4. Sentiment Indicator: The pattern reflects a strong selling pressure as the price opens at its high and closes near its low, suggesting a shift in control from buyers to sellers.
  5. Actionable Insights: It provides actionable insights for traders, such as considering exiting long positions or initiating short positions, especially when corroborated with other bearish indicators.

Example From Trading View

Example From Trading View

Defining the Bearish Belt Hold Candlestick Pattern Criteria

The Bearish Belt Hold candlestick pattern is characterized by a specific set of criteria that define its formation:

  1. Appearance in an Uptrend: The pattern typically emerges during an uptrend, signaling a potential reversal.
  2. Single Long Candle: It consists of a single long bearish candle. The length of the candle is important, as it indicates a strong selling pressure.
  3. Opening at High: The bearish candle opens at its highest point for the day. This suggests that the trading session started with bullish sentiment, which was quickly overtaken by bearish sentiment.
  4. Closing Near Low: The candle closes near its lowest point, indicating that sellers dominated the session and pushed prices down significantly from the opening.
  5. Little or No Upper Shadow: The Bearish Belt Hold typically has little or no upper shadow, demonstrating that the opening price was the high for the day.

Code For Detecting Bearish Belt Hold

//@version=5
indicator("Bearish Belt Hold", overlay=true)

// Define the highest of the last 10 bars
upper = ta.highest(10)[1]

// Determine the condition for Bearish Belt Hold
isBearishBeltHold = (high == open) and (open > upper) and (open > close) and (close < ((high[1] - low[1]) / 2) + low[1])

// Create a label for Bearish Belt Hold condition
if isBearishBeltHold
    label.new(bar_index, low, "Bearish Belt Hold", style=label.style_label_down, color=color.yellow, textcolor=color.black,yloc = yloc.abovebar)

// Set background color when Bearish Belt Hold condition is met
bgcolor(isBearishBeltHold ? color.new(color.yellow, 90) : na) // semi-transparent yellow background

Output

Output

Overview of the script 

1. Indicator Declaration

//@version=5
indicator("Bearish Belt Hold", overlay=true)
  • //@version=5: Specifies that the script uses Pine Script version 5.
  • indicator(...): Declares a new indicator named “Bearish Belt Hold”.
  • overlay=true: Indicates that the indicator will be overlaid on the main price chart.

2. Defining the Highest of the Last 10 Bars

upper = ta.highest(10)[1]
  • upper:
  • A variable assigned to store the highest value among the last 10 bars, excluding the most recent one.
  • ta.highest(10)[1]: The function ta.highest(10) finds the highest value over the last 10 bars, and [1] accesses the value of the previous bar (one bar ago), rather than the current bar.

3. Condition for Bearish Belt Hold

isBearishBeltHold = (high == open) and (open > upper) and (open > close) and (close < ((high[1] - low[1]) / 2) + low[1])
  • isBearishBeltHold: A boolean variable that becomes true if the conditions for the Bearish Belt Hold pattern are met.
  • (high == open): Checks if the high and the opening price of the current bar are the same, indicating no upper shadow and a strong opening selling pressure.
  • (open > upper): Ensures that the opening price of the current bar is higher than the highest price of the previous 10 bars, signifying the pattern occurs after an uptrend.
  • (open > close): Confirms that the current bar is bearish (closing price is lower than the opening price).
  • (close < ((high[1] - low[1]) / 2) + low[1]): This condition checks if the closing price is lower than the midpoint of the previous bar’s range, strengthening the bearish reversal signal.

4. Creating a Label for the Bearish Belt Hold Condition

if isBearishBeltHold
    label.new(bar_index, low, "Bearish Belt Hold", style=label.style_label_down, color=color.yellow, textcolor=color.black, yloc = yloc.abovebar)
  • This block of code creates a label on the chart when the isBearishBeltHold condition is true.
  • label.new(...): Creates a new label.
    • bar_index: Specifies the x-coordinate for the label (the current bar index).
    • low: Sets the y-coordinate at the low price of the current bar.
    • "Bearish Belt Hold": The text displayed in the label.
    • style=label.style_label_down: Sets the style of the label to a downward arrow.
    • color=color.yellow: Defines the label’s background color as yellow.
    • textcolor=color.black: Sets the text color of the label to black.
    • yloc = yloc.abovebar: Positions the label above the bar to avoid obscuring candlestick details.

5. Setting Background Color for the Bearish Belt Hold Condition:

bgcolor(isBearishBeltHold ? color.new(color.yellow, 90) : na) // semi-transparent yellow background
  • bgcolor(...): Changes the background color of the chart.
  • isBearishBeltHold ? color.new(color.yellow, 90) : na: If isBearishBeltHold is true, sets a semi-transparent yellow background (90% opacity). If false, no background color is applied (na).

Frequently Asked Questions

What does the “Bearish Belt Hold” Pine Script detect?

It identifies the Bearish Belt Hold candlestick pattern, a bearish reversal signal during uptrends.

How does the script recognize the Bearish Belt Hold pattern?

The script checks for a long bearish candle with no upper shadow, opening above the recent high and closing near the low.

What is the purpose of the label in the script?

The label visually marks the occurrence of the Bearish Belt Hold pattern on the chart for easy identification.

Can the color of the label and background be customized?

Yes, colors for both the label and background are customizable within the script.

Is this script suitable for all trading instruments?

Generally, yes, but its effectiveness can vary depending on the market and time frame being analyzed.

Conclusion

This script is designed for detecting the Bearish Belt Hold candlestick pattern, a key indicator of potential bearish reversals in uptrends. By automating its identification, the script enhances traders’ ability to quickly recognize and react to significant market shifts. The use of labels and background coloring in the script provides clear visual cues, aiding in prompt decision-making. Tailored for Pine Script version 5, it’s a valuable tool for traders integrating technical analysis into their strategies. However, it’s recommended to use this pattern in conjunction with other analysis methods for more robust trading insights.

Leave a Comment