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

Three White Soldiers

The Three White Soldiers candlestick pattern stands as a beacon for traders seeking to identify bullish reversals with confidence. This article, "Three White Soldiers: Mastering the Art of Bullish Reversal in candlestick patterns," delivers a comprehensive, expert-level exploration of the pattern’s structure, psychology, and practical application. Whether you are a seasoned trader or a curious beginner, you will discover actionable insights, real-world code examples, and advanced strategies to harness the full power of this classic formation.

Introduction

The Three White Soldiers pattern is a renowned bullish reversal signal in candlestick charting. It consists of three consecutive long-bodied bullish candles, each opening within the previous candle’s real body and closing near its high. This formation marks a decisive shift in market sentiment from bearish to bullish, making it a favorite among technical analysts and traders worldwide.

Candlestick charting originated in 18th-century Japan, pioneered by rice trader Munehisa Homma. Over centuries, these visual representations of price action have become integral to modern trading, offering deep insights into market psychology and trend reversals. The Three White Soldiers, in particular, has stood the test of time due to its reliability and clarity.

In today’s fast-paced markets—stocks, forex, crypto, and commodities—the Three White Soldiers pattern remains a vital tool. Its ability to highlight strong buying pressure and potential trend reversals makes it indispensable for traders seeking high-probability setups.

Pattern Structure and Formation

The anatomy of the Three White Soldiers pattern is precise. Each candle in the sequence must:

  • Open within the real body of the previous candle
  • Close near its high, with little or no upper shadow
  • Have a long real body, indicating strong buying momentum

The pattern typically forms after a prolonged downtrend or consolidation, signaling a potential bullish reversal. While the classic version uses three candles, some variations may include more, but the essence remains the same: consecutive bullish closes with minimal retracement.

Color plays a crucial role. In traditional charts, white or green candles represent bullish moves. The pattern’s strength lies in the consistency of these bullish closes, each reinforcing the previous candle’s optimism.

Historical Context and Evolution

The roots of candlestick charting trace back to 18th-century Japan, where rice traders sought to visualize price movements and market psychology. Munehisa Homma, often credited as the father of candlestick analysis, developed these techniques to gain an edge in the rice markets. Over time, candlestick patterns like the Three White Soldiers became codified, spreading to Western markets in the late 20th century. Today, they are a cornerstone of technical analysis, used by traders and institutions alike to anticipate market moves and manage risk.

Psychology Behind the Pattern

The Three White Soldiers pattern reflects a dramatic shift in market sentiment. During its formation, sellers lose control as buyers step in aggressively, pushing prices higher with each session. Retail traders often see this pattern as a clear buy signal, while institutional traders may interpret it as confirmation of a broader trend reversal. The emotional landscape shifts from fear and uncertainty to confidence and greed, fueling further buying pressure. Understanding the psychology behind the pattern helps traders anticipate potential follow-through and avoid common pitfalls, such as entering too late or ignoring overbought conditions.

Types and Variations

The Three White Soldiers belongs to the bullish reversal family of candlestick patterns. Related formations include the Bullish Engulfing, Morning Star, and Piercing Line. Each shares the theme of a decisive shift from bearish to bullish sentiment but differs in structure and context. Strong signals occur when the pattern forms after a significant downtrend, with each candle displaying long bodies and minimal shadows. Weak signals may arise if the candles are small, overlap significantly, or appear in overbought markets. False signals and traps are common, especially in volatile markets. Traders should watch for confirmation from volume, support/resistance levels, or other indicators to validate the pattern’s reliability.

Single vs Multi-Candle Variations

While the Three White Soldiers is inherently a multi-candle pattern, traders sometimes observe similar momentum in two-candle formations (e.g., Bullish Engulfing) or extended sequences of four or more bullish candles. However, the three-candle structure is considered optimal for balancing reliability and frequency.

Chart Examples and Market Context

In an uptrend, the Three White Soldiers pattern can signal trend continuation, while in a downtrend, it marks a potential reversal. In sideways markets, its significance may diminish, as price action lacks clear direction. On smaller timeframes (1m, 15m), the pattern may appear more frequently but with reduced reliability due to noise. On daily or weekly charts, its occurrence is rarer but more meaningful, often leading to sustained moves.

For example, in the forex market, the EUR/USD pair may form a Three White Soldiers pattern on the daily chart after a prolonged decline, signaling a shift in sentiment and a potential rally. In stocks, a beaten-down tech stock might display the pattern on the weekly chart, attracting institutional buyers and triggering a trend reversal.

Practical Applications and Trading Strategies

Traders use the Three White Soldiers pattern to identify entry and exit points, set stop losses, and manage risk. A typical strategy involves entering a long position at the close of the third candle, with a stop loss below the low of the first candle. Combining the pattern with indicators such as moving averages, RSI, or MACD can enhance its effectiveness. For instance, a Three White Soldiers pattern forming above a rising 50-day moving average provides additional confirmation of bullish momentum. Risk management is crucial. While the pattern is reliable, false signals can occur, especially in overbought markets or near resistance levels. Setting appropriate stop losses and position sizes helps mitigate potential losses.

Backtesting and Reliability

Backtesting the Three White Soldiers pattern across different markets reveals varying success rates. In stocks, the pattern often precedes significant rallies, especially when confirmed by volume and trend indicators. In forex, its reliability depends on the currency pair and timeframe, with higher success rates on daily and weekly charts. Crypto markets, known for their volatility, may produce more false signals, but the pattern remains valuable when combined with other technical tools. Commodities traders also use the pattern to anticipate reversals in gold, oil, and other assets. Institutions may use the pattern differently, often as part of broader algorithmic strategies or in conjunction with order flow analysis. Common pitfalls in backtesting include overfitting, ignoring market context, and failing to account for slippage and transaction costs.

Advanced Insights and Algorithmic Trading

Algorithmic trading systems often incorporate the Three White Soldiers pattern as a trigger for long positions. Machine learning models can be trained to recognize the pattern and assess its reliability based on historical data and market conditions. In the context of Wyckoff and Smart Money Concepts, the pattern may signal the end of accumulation and the start of a markup phase, attracting institutional participation and driving prices higher. Advanced traders may use the pattern as part of a multi-factor model, combining it with volume analysis, order book data, and sentiment indicators to improve accuracy and reduce false positives.

Case Studies and Real-World Examples

One famous example of the Three White Soldiers pattern occurred during the 2009 stock market recovery. After a prolonged bear market, several major indices formed the pattern on weekly charts, signaling the start of a new bull market. In the crypto space, Bitcoin displayed a textbook Three White Soldiers pattern on the daily chart in early 2019, marking the end of a bear market and the beginning of a sustained rally. In forex, the USD/JPY pair formed the pattern on the daily chart in 2016, leading to a significant trend reversal and a multi-month rally.

Comparison Table

PatternStructureSignal StrengthReliability
Three White Soldiers3 consecutive bullish candlesStrongHigh
Bullish Engulfing1 bullish candle engulfs previous bearishModerateMedium
Morning Star3 candles: bearish, doji/star, bullishStrongHigh

Practical Guide for Traders

Before trading the Three White Soldiers pattern, follow this step-by-step checklist:

  • Identify the pattern after a downtrend or consolidation
  • Confirm each candle opens within the previous real body and closes near its high
  • Check for supporting indicators (volume, moving averages, RSI)
  • Set stop loss below the low of the first candle
  • Calculate risk/reward ratio and position size accordingly
  • Avoid trading the pattern in overbought markets or near resistance

Risk/reward examples: If the pattern forms at $50 with a stop loss at $48 and a target at $56, the risk/reward ratio is 1:3, offering a favorable setup. Common mistakes to avoid include chasing the pattern after a large move, ignoring market context, and failing to use proper risk management.

Code Examples: Detecting Three White Soldiers in Multiple Languages

Below are real-world code snippets for detecting the Three White Soldiers pattern in various programming environments. Use these as a foundation for your own trading systems and backtesting frameworks.

// C++ Example: Detecting Three White Soldiers
#include <vector>
bool isThreeWhiteSoldiers(const std::vector<double>& open, const std::vector<double>& close, const std::vector<double>& high) {
    int n = open.size();
    if (n < 3) return false;
    for (int i = 2; i < n; ++i) {
        bool bull1 = close[i-2] > open[i-2];
        bool bull2 = close[i-1] > open[i-1];
        bool bull3 = close[i] > open[i];
        bool cond1 = open[i-1] >= open[i-2] && open[i-1] <= close[i-2];
        bool cond2 = open[i] >= open[i-1] && open[i] <= close[i-1];
        bool smallShadow1 = (high[i-2] - close[i-2]) < (close[i-2] - open[i-2]) * 0.2;
        bool smallShadow2 = (high[i-1] - close[i-1]) < (close[i-1] - open[i-1]) * 0.2;
        bool smallShadow3 = (high[i] - close[i]) < (close[i] - open[i]) * 0.2;
        if (bull1 && bull2 && bull3 && cond1 && cond2 && smallShadow1 && smallShadow2 && smallShadow3)
            return true;
    }
    return false;
}
# Python Example: Detecting Three White Soldiers
def is_three_white_soldiers(open_, close, high):
    n = len(open_)
    if n < 3:
        return False
    for i in range(2, n):
        bull1 = close[i-2] > open_[i-2]
        bull2 = close[i-1] > open_[i-1]
        bull3 = close[i] > open_[i]
        cond1 = open_[i-1] >= open_[i-2] and open_[i-1] <= close[i-2]
        cond2 = open_[i] >= open_[i-1] and open_[i] <= close[i-1]
        small_shadow1 = (high[i-2] - close[i-2]) < (close[i-2] - open_[i-2]) * 0.2
        small_shadow2 = (high[i-1] - close[i-1]) < (close[i-1] - open_[i-1]) * 0.2
        small_shadow3 = (high[i] - close[i]) < (close[i] - open_[i]) * 0.2
        if all([bull1, bull2, bull3, cond1, cond2, small_shadow1, small_shadow2, small_shadow3]):
            return True
    return False
// Node.js Example: Detecting Three White Soldiers
function isThreeWhiteSoldiers(open, close, high) {
  if (open.length < 3) return false;
  for (let i = 2; i < open.length; i++) {
    const bull1 = close[i-2] > open[i-2];
    const bull2 = close[i-1] > open[i-1];
    const bull3 = close[i] > open[i];
    const cond1 = open[i-1] >= open[i-2] && open[i-1] <= close[i-2];
    const cond2 = open[i] >= open[i-1] && open[i] <= close[i-1];
    const smallShadow1 = (high[i-2] - close[i-2]) < (close[i-2] - open[i-2]) * 0.2;
    const smallShadow2 = (high[i-1] - close[i-1]) < (close[i-1] - open[i-1]) * 0.2;
    const smallShadow3 = (high[i] - close[i]) < (close[i] - open[i]) * 0.2;
    if (bull1 && bull2 && bull3 && cond1 && cond2 && smallShadow1 && smallShadow2 && smallShadow3) {
      return true;
    }
  }
  return false;
}
//@version=6
// Three White Soldiers Pattern Detector
indicator("Three White Soldiers Detector", overlay=true)

// Function to check for bullish candle
isBullish(open, close) => close > open

// Detect Three White Soldiers
bull1 = isBullish(open[2], close[2])
bull2 = isBullish(open[1], close[1])
bull3 = isBullish(open, close)

body1 = math.abs(close[2] - open[2])
body2 = math.abs(close[1] - open[1])
body3 = math.abs(close - open)

// Criteria: Each candle opens within previous body and closes near high
cond1 = open[1] >= open[2] and open[1] <= close[2]
cond2 = open >= open[1] and open <= close[1]

upperShadow1 = high[2] - close[2]
upperShadow2 = high[1] - close[1]
upperShadow3 = high - close

smallShadow1 = upperShadow1 < body1 * 0.2
smallShadow2 = upperShadow2 < body2 * 0.2
smallShadow3 = upperShadow3 < body3 * 0.2

pattern = bull1 and bull2 and bull3 and cond1 and cond2 and smallShadow1 and smallShadow2 and smallShadow3

// Plot signals
plotshape(pattern, title="Three White Soldiers", location=location.belowbar, color=color.green, style=shape.labelup, text="3WS")

// Alert condition
alertcondition(pattern, title="Three White Soldiers Alert", message="Three White Soldiers pattern detected!")
// MetaTrader 5 Example: Detecting Three White Soldiers
bool IsThreeWhiteSoldiers(double &open[], double &close[], double &high[])
{
   int n = ArraySize(open);
   if(n < 3) return false;
   for(int i=2; i<n; i++)
   {
      bool bull1 = close[i-2] > open[i-2];
      bool bull2 = close[i-1] > open[i-1];
      bool bull3 = close[i] > open[i];
      bool cond1 = open[i-1] >= open[i-2] && open[i-1] <= close[i-2];
      bool cond2 = open[i] >= open[i-1] && open[i] <= close[i-1];
      bool smallShadow1 = (high[i-2] - close[i-2]) < (close[i-2] - open[i-2]) * 0.2;
      bool smallShadow2 = (high[i-1] - close[i-1]) < (close[i-1] - open[i-1]) * 0.2;
      bool smallShadow3 = (high[i] - close[i]) < (close[i] - open[i]) * 0.2;
      if(bull1 && bull2 && bull3 && cond1 && cond2 && smallShadow1 && smallShadow2 && smallShadow3)
         return true;
   }
   return false;
}

Conclusion

The Three White Soldiers pattern is a reliable and powerful tool for identifying bullish reversals and trend continuations. While no pattern is infallible, combining it with sound risk management and supporting indicators can significantly improve trading outcomes. Trust the pattern when it aligns with broader market context, but remain cautious in overextended or volatile conditions. Ultimately, disciplined execution and continuous learning are the keys to long-term trading success.

Code Explanation

The Pine Script code provided above detects the Three White Soldiers pattern on TradingView charts. It checks for three consecutive bullish candles, each opening within the previous real body and closing near its high. When the pattern is detected, it plots a label below the third candle and triggers an alert. The logic is mirrored in the C++, Python, Node.js, and MetaTrader 5 examples, allowing traders to implement detection across multiple platforms. Customize these scripts to fit your trading style and risk preferences for optimal results.

Frequently Asked Questions about Three White Soldiers

What is the Three White Soldiers Pine Script strategy?

The Three White Soldiers Pine Script strategy is a technical analysis-based trading strategy that identifies potential breakouts in financial markets.

It involves identifying three consecutive white candle bodies on a chart, which are considered to be bullish signals.

How does the strategy work?

The strategy works by using Pine Script to analyze price action and identify potential breakouts.

  • It uses a combination of moving averages, RSI, and other indicators to determine when a stock is due for a breakout.
  • When three consecutive white candle bodies are identified, it signals a potential buy opportunity.

What are the benefits of using the Three White Soldiers strategy?

The benefits of using this strategy include:

  • Low risk and high reward potential
  • Easy to implement and trade
  • Can be used on various financial markets, including stocks, forex, and futures

This strategy is ideal for traders who want to capitalize on strong price movements without taking excessive risk.

How do I set up the strategy in Pine Script?

To set up the strategy in Pine Script, you will need to:

  • Download and install Pine Editor
  • Create a new script and paste the Three White Soldiers code into it
  • Configure the indicators and parameters to suit your trading style

Once set up, the strategy can be backtested and used in live trading.

What are some common mistakes to avoid when using the Three White Soldiers strategy?

Some common mistakes to avoid include:

  • Overtrading and entering too many positions
  • Failing to set stop-losses and position sizing
  • Not adjusting parameters and indicators for changing market conditions

It's essential to stay disciplined, patient, and informed when using this strategy.



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