🪙
 Get student discount & enjoy best sellers ~$7/week

Harami Cross

The Harami Cross is a fascinating and powerful candlestick pattern that signals potential reversals in financial markets. This article, "Harami Cross," explores the pattern's structure, psychology, and practical applications, offering traders a comprehensive guide to mastering this essential tool in technical analysis.

Introduction

The Harami Cross is a two-candle formation that stands out for its reliability in signaling market reversals. Originating from Japanese rice trading in the 18th century, candlestick charting has become a cornerstone of modern technical analysis. The Harami Cross, with its distinctive doji second candle, is particularly important because it highlights periods of indecision and potential turning points in price action. In today's fast-paced markets, recognizing such patterns can give traders a significant edge.

What is the Harami Cross Pattern?

The Harami Cross is a variation of the Harami candlestick pattern. It consists of a large-bodied candle (either bullish or bearish) followed by a doji that is completely contained within the body of the first candle. The doji represents indecision in the market, making the Harami Cross a strong indicator of a potential reversal. The pattern is most effective after a prolonged trend, where it signals that the prevailing momentum may be weakening.

Historical Background and Origin

Candlestick charting originated in Japan during the 18th century, primarily used by rice traders to track market prices and trends. The Harami Cross, like many other candlestick patterns, was developed through years of observation and analysis. Its name, "Harami," means "pregnant" in Japanese, reflecting the visual appearance of the pattern. The doji, a key component of the Harami Cross, symbolizes market indecision and has been a critical element in Japanese technical analysis for centuries.

Structure and Formation of the Harami Cross

The Harami Cross consists of two candles:

  • First Candle: A large-bodied candle that reflects strong market momentum in one direction.
  • Second Candle (Doji): A doji that is completely contained within the body of the first candle, indicating indecision and a potential reversal.

The anatomy of each candle is crucial:

  • Open: The price at which the candle begins.
  • Close: The price at which the candle ends.
  • High: The highest price during the candle's period.
  • Low: The lowest price during the candle's period.

Single-candle variations, such as the standard doji, lack the context provided by the preceding large candle. The Harami Cross, as a multi-candle pattern, offers a more nuanced view of market sentiment. Color plays a role: a bullish Harami Cross forms after a downtrend with a white (or green) doji, while a bearish Harami Cross appears after an uptrend with a black (or red) doji.

Psychology Behind the Pattern

The Harami Cross reflects a dramatic shift in market sentiment. During its formation, the first candle represents strong momentum in one direction. The doji that follows signals indecision, as neither buyers nor sellers can dominate. Retail traders often see this as a warning of a potential reversal, while institutional traders may interpret it as an opportunity to accumulate or distribute positions quietly. Emotions such as fear, greed, and uncertainty are heightened, making the Harami Cross a focal point for market psychology.

Types & Variations

The Harami Cross belongs to the broader Harami family of patterns. Variations include the standard Harami (with a small real body instead of a doji) and the Inside Bar (common in Western technical analysis). Strong signals occur when the doji is perfectly contained within the previous candle's body and appears after a prolonged trend. Weak signals or false positives can arise in choppy markets or when the pattern forms without clear preceding momentum. Traders must be wary of traps, especially in low-volume environments.

Chart Examples and Real-World Scenarios

In an uptrend, a bearish Harami Cross may signal the end of bullish momentum, while in a downtrend, a bullish Harami Cross can indicate a bottom. On small timeframes (1m, 15m), the pattern may appear frequently but with less reliability due to market noise. On daily or weekly charts, the Harami Cross is more significant and often marks major turning points. For example, in the forex market, a Harami Cross on the EUR/USD daily chart after a sustained rally can precede a sharp reversal. In crypto, Bitcoin's weekly chart has shown Harami Crosses before major corrections.

Practical Applications in Trading

Traders use the Harami Cross to develop entry and exit strategies. A common approach is to enter a trade in the direction opposite to the preceding trend once the pattern is confirmed by the next candle. Stop-loss orders are typically placed below the low (for bullish setups) or above the high (for bearish setups) of the pattern. Combining the Harami Cross with indicators like RSI, MACD, or moving averages can improve accuracy. For example, a bullish Harami Cross confirmed by an oversold RSI increases the probability of a successful trade.

Backtesting & Reliability

Backtesting reveals that the Harami Cross has varying success rates across markets. In stocks, it performs well on daily charts, especially in trending environments. In forex, its reliability increases on higher timeframes. In crypto, the pattern is effective but can produce false signals during periods of extreme volatility. Institutions often use the Harami Cross as part of broader strategies, incorporating volume and order flow analysis. Common pitfalls in backtesting include overfitting and ignoring market context.

Advanced Insights: Algorithmic and Quantitative Approaches

Algorithmic traders program systems to detect Harami Cross patterns automatically, often combining them with other signals for higher accuracy. Machine learning models can be trained to recognize the pattern and predict outcomes based on historical data. In the context of Wyckoff and Smart Money Concepts, the Harami Cross can signal phases of accumulation or distribution, providing valuable clues about institutional activity.

Case Studies

One famous example is the 2008 financial crisis, where several major stocks formed bullish Harami Cross patterns at their bottoms, signaling the start of a recovery. In recent years, Ethereum's daily chart displayed a bearish Harami Cross before a significant correction in 2021. In commodities, gold futures have shown the pattern at key turning points, providing early warnings for traders.

Comparison Table: Harami Cross vs. Other Patterns

PatternStructureSignal StrengthReliability
Harami CrossLarge candle + doji insideStrongHigh in trends
Standard HaramiLarge candle + small body insideModerateMedium
EngulfingSecond candle engulfs firstVery strongVery high

Practical Guide for Traders

  • Step 1: Identify a clear trend.
  • Step 2: Look for a large candle followed by a doji within its body.
  • Step 3: Wait for confirmation from the next candle.
  • Step 4: Set stop-loss and calculate risk/reward.
  • Step 5: Combine with other indicators for confirmation.

For example, if you spot a bullish Harami Cross after a downtrend in Apple stock, wait for a bullish candle to confirm before entering. Avoid trading the pattern in sideways markets, and always use proper risk management to protect your capital.

Harami Cross Detection Code Examples

Below are code examples for detecting the Harami Cross pattern in various programming languages and trading platforms. These examples help automate pattern recognition and integrate it into your trading strategy.

// Harami Cross Detection in C++
bool isDoji(double open, double close, double high, double low) {
    double body = fabs(close - open);
    double range = high - low;
    return body <= range * 0.1;
}
bool isBullishHaramiCross(double open1, double close1, double open2, double close2, double high2, double low2) {
    return close1 < open1 && isDoji(open2, close2, high2, low2) && open2 > close1 && close2 < open1;
}
bool isBearishHaramiCross(double open1, double close1, double open2, double close2, double high2, double low2) {
    return close1 > open1 && isDoji(open2, close2, high2, low2) && open2 < close1 && close2 > open1;
}
# Harami Cross Detection in Python
def is_doji(open_, close, high, low):
    body = abs(close - open_)
    range_ = high - low
    return body <= range_ * 0.1

def is_bullish_harami_cross(open1, close1, open2, close2, high2, low2):
    return close1 < open1 and is_doji(open2, close2, high2, low2) and open2 > close1 and close2 < open1

def is_bearish_harami_cross(open1, close1, open2, close2, high2, low2):
    return close1 > open1 and is_doji(open2, close2, high2, low2) and open2 < close1 and close2 > open1
// Harami Cross Detection in Node.js
function isDoji(open, close, high, low) {
    const body = Math.abs(close - open);
    const range = high - low;
    return body <= range * 0.1;
}
function isBullishHaramiCross(open1, close1, open2, close2, high2, low2) {
    return close1 < open1 && isDoji(open2, close2, high2, low2) && open2 > close1 && close2 < open1;
}
function isBearishHaramiCross(open1, close1, open2, close2, high2, low2) {
    return close1 > open1 && isDoji(open2, close2, high2, low2) && open2 < close1 && close2 > open1;
}
// Harami Cross Detection in Pine Script
// This script identifies Harami Cross patterns on the chart
//@version=6
indicator("Harami Cross Detector", overlay=true)
// Function to check for doji
is_doji(open, close, high, low) =>
    body = math.abs(close - open)
    range = high - low
    body <= range * 0.1
// Detect Harami Cross
bullish_harami_cross = close[1] < open[1] and is_doji(open, close, high, low) and open > close[1] and close < open[1]
bearish_harami_cross = close[1] > open[1] and is_doji(open, close, high, low) and open < close[1] and close > open[1]
plotshape(bullish_harami_cross, title="Bullish Harami Cross", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(bearish_harami_cross, title="Bearish Harami Cross", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// Add alerts
alertcondition(bullish_harami_cross, title="Bullish Harami Cross Alert", message="Bullish Harami Cross detected!")
alertcondition(bearish_harami_cross, title="Bearish Harami Cross Alert", message="Bearish Harami Cross detected!")
// Harami Cross Detection in MetaTrader 5 (MQL5)
bool isDoji(double open, double close, double high, double low) {
    double body = MathAbs(close - open);
    double range = high - low;
    return body <= range * 0.1;
}
bool isBullishHaramiCross(double open1, double close1, double open2, double close2, double high2, double low2) {
    return close1 < open1 && isDoji(open2, close2, high2, low2) && open2 > close1 && close2 < open1;
}
bool isBearishHaramiCross(double open1, double close1, double open2, double close2, double high2, double low2) {
    return close1 > open1 && isDoji(open2, close2, high2, low2) && open2 < close1 && close2 > open1;
}

Code Explanation

The code examples above demonstrate how to detect the Harami Cross pattern in C++, Python, Node.js, Pine Script, and MetaTrader 5. Each implementation checks for a doji candle contained within the previous large-bodied candle, confirming the Harami Cross pattern. These scripts can be integrated into trading systems for automated pattern recognition and signal generation. Adjust the doji sensitivity or combine with other indicators for more robust strategies.

Conclusion

The Harami Cross is a powerful tool for identifying potential reversals, but it should not be used in isolation. Trust the pattern when it appears after a clear trend and is confirmed by other signals. Ignore it in choppy or low-volume markets. With discipline and proper analysis, the Harami Cross can enhance your trading strategy and improve your results.

Frequently Asked Questions about Harami Cross

What is a Harami Cross in Pine Script?

A Harami Cross is a technical indicator used in trading that involves two candles: a small body followed by a larger body of the same color. The Harami Cross can be used to identify potential reversals or continuations in price movement.

How do I use the Harami Cross strategy in Pine Script?

To use the Harami Cross strategy, you need to write a Pine Script code that detects the Harami Cross pattern and then implements your trading logic. The script should also include indicators for confirmation and risk management.

Here is an example of how to implement the Harami Cross in Pine Script:

  • plot(haramicross(candlestick.close, 2));
  • if(haramicross(candlestick.close, 2) == true)
  • // Implement trading logic here

What are the benefits of using the Harami Cross strategy?

The Harami Cross strategy offers several benefits to traders, including:

  • Identifying potential reversals or continuations in price movement;
  • Reducing false signals from other indicators;
  • Providing a clear entry and exit point for trades.

Can the Harami Cross strategy be used on any time frame?

The Harami Cross strategy can be used on any time frame, but it is most effective when used on higher time frames such as 4H or D1. This allows for a clearer view of the overall market trend and reduces noise from shorter-term price movements.

How do I optimize my Harami Cross strategy?

To optimize your Harami Cross strategy, you need to fine-tune the parameters such as the duration of the small body (2-5 bars) and the confirmation period. You should also test different indicators for risk management and consider using other technical indicators in combination with the Harami Cross.

Here are some general guidelines:

  • Adjust the duration of the small body to suit your trading style;
  • Set a confirmation period of at least 2-3 bars;
  • Use other indicators for risk management such as stop-loss and take-profit levels.



How to post a request?

Posting a request is easy. Get Matched with experts within 5 minutes

  • 1:1 Live Session: $60/hour
  • MVP Development / Code Reviews: $200 budget
  • Bot Development: $400 per bot
  • Portfolio Optimization: $300 per portfolio
  • Custom Trading Strategy: $99 per strategy
  • Custom AI Agents: Starting at $100 per agent
Professional Services: Trading Debugging $60/hr, MVP Development $200, AI Trading Bot $400, Portfolio Optimization $300, Trading Strategy $99, Custom AI Agent $100. Contact for expert help.
⭐⭐⭐ 500+ Clients Helped | 💯 100% Satisfaction Rate


Was this content helpful?

Help us improve this article