Overview of Marubozu Candlestick Pattern
The Marubozu candlestick pattern is notable in technical analysis used by traders to predict potential market trends based on historical price movements. Here’s an overview of its key characteristics and implications:
Appearance and Structure:
- Full Body: The Marubozu is characterized by a long body with little to no shadows (or wicks) at either end. This indicates a strong market movement in one direction for the entire trading period.
- Bullish Marubozu: In this variation, the candle is long and green (or white in some charting platforms), signifying that the opening price was at the low and the closing price was at the high for the day.
- Bearish Marubozu: Conversely, a long red (or black) candle indicates a Bearish Marubozu, where the opening price was at the high and the closing price was at the low.
Importance in Technical Analysis
The Marubozu candlestick pattern holds significant importance in technical analysis for several reasons:
- Indication of Strong Market Sentiment: The Marubozu pattern, with its long body and lack of shadows, indicates a strong buying or selling sentiment. In a bullish Marubozu, the buyers maintained control throughout the trading session, pushing prices from the open to the high of the day. Conversely, in a bearish Marubozu, sellers dominated the session, driving prices from the open to the low.
- Potential Trend Indicator: The appearance of a Marubozu can be a strong indicator of the beginning or continuation of a trend. A bullish Marubozu in a downtrend may signal a reversal, while in an uptrend, it reinforces the ongoing bullish trend. Similarly, a bearish Marubozu could indicate the start of a downtrend or the continuation of an existing downtrend.
- Simplicity and Clarity: The Marubozu pattern is relatively easy to identify, making it accessible to both novice and experienced traders. Its clear implication of strong bullish or bearish sentiment makes it a straightforward tool for decision-making in trade management.
- Volume Correlation: When accompanied by high trading volume, a Marubozu is considered more significant, as high volume suggests a strong commitment from traders and investors to that price direction.
- Strategic Entry and Exit Points: Traders often use the Marubozu pattern to determine strategic entry and exit points. The ends of the Marubozu body can serve as reference points for setting stop-loss orders or for predicting future support or resistance levels.
Example From Trading View
Defining the Marubozu Candlestick Pattern Criteria
- Full Body with No Shadows: The most distinctive feature of a Marubozu is its full body with little to no shadows (or wicks). This means the open and close prices are very close to the high and low prices of the period, respectively.
- Bullish Marubozu Criteria: The opening price is equal to the low of the period. The closing price is equal to the high of the period. The body of the candle is long and typically green or white, indicating a strong upward movement in price.
- Bearish Marubozu Criteria: The opening price is equal to the high of the period. The closing price is equal to the low of the period. The body of the candle is long and typically red or black, indicating a strong downward movement in price.
Code For Detecting Marubozu
//@version=5 indicator("Marubozu Detector", shorttitle="Marubozu", overlay=true) tolerance = input.float(0.02, title="Tolerance Level") isBullishMarubozu = (open == low or math.abs(open - low) <= (high - low) * tolerance) and (close == high or math.abs(close - high) <= (high - low) * tolerance) isBearishMarubozu = (open == high or math.abs(open - high) <= (high - low) * tolerance) and (close == low or math.abs(close - low) <= (high - low) * tolerance) if isBullishMarubozu label.new(bar_index, high, "Bullish Marubozu", color=color.rgb(0, 255, 76), style=label.style_label_down, textcolor=color.rgb(0, 0, 0)) if isBearishMarubozu label.new(bar_index, high, "Bearish Marubozu", color=color.rgb(255, 0, 0), style=label.style_label_down, textcolor=color.white)
Output
Overview of the script
1. Script Declaration
//@version=5 indicator("Marubozu Detector", shorttitle="Marubozu", overlay=true)
//@version=5: Specifies that the script uses version 5 of Pine Script.
indicator(…): Declares a new indicator. “Marubozu Detector” is the name displayed on the chart, with “Marubozu” as the short title.
overlay=true: This makes the indicator appear on the main chart (overlaying the price) rather than in a separate panel below.
2. Input Declaration
tolerance = input.float(0.02, title="Tolerance Level")
input.float(…): Creates a user-adjustable floating-point input with a default value of 0.02 (2%). This sets the tolerance level for detecting the Marubozu pattern.
3. Bullish Marubozu Detection
isBullishMarubozu = (open == low or math.abs(open - low) <= (high - low) * tolerance) and (close == high or math.abs(close - high) <= (high - low) * tolerance)
This line checks if the current candle is a Bullish Marubozu.
A Bullish Marubozu is identified if the open is equal to (or within the tolerance of) the low and the close is equal to (or within the tolerance of) the high.
4. Bearish Marubozu Detection
isBearishMarubozu = (open == high or math.abs(open - high) <= (high - low) * tolerance) and (close == low or math.abs(close - low) <= (high - low) * tolerance)
Similar to the Bullish Marubozu, this line checks for a Bearish Marubozu.
A Bearish Marubozu occurs when the open is equal to (or within the tolerance of) the high and the close is equal to (or within the tolerance of) the low.
5. Labeling Bullish Marubozu
if isBullishMarubozu label.new(bar_index, high, "Bullish Marubozu", color=color.rgb(0, 255, 76), style=label.style_label_down, textcolor=color.rgb(0, 0, 0))
This conditional statement checks if isBullishMarubozu is true.
If true, it creates a new label at the high price of the bar with the text “Bullish Marubozu”. The label is colored green (RGB 0, 255, 76) with black text.
6. Labeling Bearish Marubozu
if isBearishMarubozu label.new(bar_index, high, "Bearish Marubozu", color=color.rgb(255, 0, 0), style=label.style_label_down, textcolor=color.white)
This checks if isBearishMarubozu is true.
If true, it creates a similar label but for a Bearish Marubozu. The label is colored red (RGB 255, 0, 0) with white text.
Frequently Asked Questions
Yes, the script can be applied to various financial instruments, including stocks, forex, commodities, and indices, as long as their price data is available on TradingView.
You can customize the script by changing the tolerance level or modifying the script code in the Pine Editor. However, familiarity with Pine Script coding is necessary for more complex customizations.
The script labels Bullish and Bearish Marubozu patterns, which can be interpreted as bullish or bearish signals. However, these should not be taken as direct buy or sell signals without further analysis.
Yes, the script can be applied to any timeframe available on TradingView, from one-minute charts to monthly charts. The pattern’s significance may vary depending on the timeframe.
Conclusion
In conclusion, the Pine Script for detecting Marubozu candlestick patterns in TradingView is a powerful tool for traders who rely on technical analysis. This script, with its customizable tolerance levels, offers flexibility in identifying both Bullish and Bearish Marubozu patterns across various financial instruments and timeframes. While it simplifies the process of spotting these significant patterns, it’s important to remember that it should not be the sole tool for making trading decisions. The effectiveness of the Marubozu Detector is enhanced when used in conjunction with other technical indicators and fundamental analysis methods.