11 min read·Algomaya Team

Candlestick Patterns: The Complete Cheat Sheet

candlestick patternshammerengulfingmorning stardojishooting starchart patternstechnical analysis

Candlestick Patterns: The Complete Cheat Sheet

Candlestick patterns are the language of price charts. Developed in Japan over 200 years ago for rice trading, these patterns reveal the battle between buyers and sellers in a visually intuitive way.

Anatomy of a Candlestick

  • Body: The rectangle showing open-to-close range
  • Upper wick/shadow: Line above the body showing the session high
  • Lower wick/shadow: Line below the body showing the session low
  • Bullish candle (green): Close above open
  • Bearish candle (red): Close below open

Single Candle Patterns

Hammer (Bullish Reversal)

  • Small body at the top of the range
  • Long lower wick (2-3x body length)
  • Little to no upper wick
  • Found at the bottom of a downtrend
  • Signals buyers stepping in and rejecting lower prices

Inverted Hammer (Bullish Reversal)

  • Small body at the bottom of the range
  • Long upper wick
  • Found at the bottom of a downtrend
  • Needs next-candle confirmation

Shooting Star (Bearish Reversal)

  • Small body at the bottom of the range
  • Long upper wick (2-3x body length)
  • Found at the top of an uptrend
  • Shows rejection of higher prices

Hanging Man (Bearish Reversal)

  • Same shape as hammer but found at the top of an uptrend
  • Long lower wick despite being at resistance
  • Warning signal that buying momentum is fading

Doji (Indecision)

  • Open and close are nearly the same (very small body)
  • Types: Standard doji, Dragonfly doji, Gravestone doji, Long-legged doji
  • Signals indecision; potential reversal when at key levels
  • Needs context and confirmation

Marubozu (Strong Momentum)

  • Full body with no wicks
  • Bullish marubozu: Opens at the low, closes at the high
  • Bearish marubozu: Opens at the high, closes at the low
  • Shows complete dominance by buyers or sellers

Two-Candle Patterns

Bullish Engulfing

  • First candle: Bearish (red)
  • Second candle: Bullish (green) that completely engulfs the first candle's body
  • Found at the bottom of a downtrend or at support
  • One of the most reliable bullish reversal signals

Bearish Engulfing

  • First candle: Bullish (green)
  • Second candle: Bearish (red) that completely engulfs the first
  • Found at the top of an uptrend or at resistance
  • Strong bearish reversal signal

Tweezer Tops (Bearish)

  • Two candles with nearly identical highs
  • Shows double rejection at the same price level
  • More significant at resistance levels

Tweezer Bottoms (Bullish)

  • Two candles with nearly identical lows
  • Shows double support at the same price level
  • More significant at support levels

Piercing Line (Bullish)

  • First candle: Strong bearish
  • Second candle: Opens below the first candle's low, closes above its midpoint
  • Shows buyers overwhelming sellers mid-candle

Dark Cloud Cover (Bearish)

  • First candle: Strong bullish
  • Second candle: Opens above the first candle's high, closes below its midpoint
  • Opposite of the piercing line

Three-Candle Patterns

Morning Star (Bullish Reversal)

  1. Long bearish candle
  2. Small-bodied candle (gaps down) showing indecision
  3. Long bullish candle that closes above the midpoint of candle 1
  • Powerful reversal signal at support levels

Evening Star (Bearish Reversal)

  1. Long bullish candle
  2. Small-bodied candle (gaps up)
  3. Long bearish candle that closes below the midpoint of candle 1
  • Powerful reversal signal at resistance levels

Three White Soldiers (Bullish)

  • Three consecutive long bullish candles
  • Each opens within the previous body and closes near its high
  • Strong momentum signal

Three Black Crows (Bearish)

  • Three consecutive long bearish candles
  • Mirror image of three white soldiers
  • Strong bearish momentum signal

Quick Reference Table

Pattern Type Candles Reliability
Hammer Bullish reversal 1 High
Shooting Star Bearish reversal 1 High
Engulfing Reversal 2 Very high
Morning/Evening Star Reversal 3 Very high
Doji Indecision 1 Moderate
Three Soldiers/Crows Continuation 3 High

Trading Candlestick Patterns

Rules for Higher Probability

  1. Context matters: Patterns at key support/resistance levels are far more reliable
  2. Trend alignment: Reversal patterns at the end of a clear trend are more meaningful
  3. Volume confirmation: High volume on the pattern candle adds confidence
  4. Indicator confirmation: RSI oversold + hammer at support = high-probability buy
  5. Wait for confirmation: Enter on the candle AFTER the pattern, not during

Entry and Exit

  • Entry: On the open of the candle after the pattern completes
  • Stop loss: Beyond the pattern extreme (below hammer low, above shooting star high)
  • Target: Next major support/resistance level or 2:1 reward/risk

Common Mistakes

  1. Seeing patterns everywhere: A hammer in the middle of a range is not a signal
  2. Ignoring context: Patterns without support/resistance context are unreliable
  3. Not waiting for confirmation: The pattern candle is the signal; the next candle confirms
  4. Overcomplicating: Master 5-6 key patterns before learning exotic ones

Key Takeaways

  • Candlestick patterns reveal the psychology of buyers and sellers
  • Engulfing, hammer, shooting star, and morning/evening star are the most important
  • Always trade patterns in the context of support/resistance and trend direction
  • Confirm with volume and indicators for highest probability
  • Master a few patterns well rather than learning dozens superficially

Algomaya gives you the tools to identify candlestick patterns and practice trading them with virtual capital.


Download Algomaya on Google Play

Disclaimer: Algomaya is an educational platform. All trading is simulated with virtual capital. Past performance of any strategy does not guarantee future results.

Using Chart Patterns in Algorithmic Trading

While chart patterns are traditionally identified visually, many can be quantified for algorithmic trading:

Quantifying Support and Resistance

Support and resistance levels can be calculated algorithmically using pivot points, volume profile, or historical price clusters. When price approaches a level where it has previously reversed at least twice, the algorithm can tighten stops or adjust position sizes. This quantified approach removes the subjectivity of hand-drawn levels.

Pattern Recognition with Indicators

Instead of trying to code complex visual patterns (head and shoulders, cup and handle), use indicators that capture the same underlying dynamics. For example, a double bottom pattern is essentially: RSI making a higher low while price makes a lower low (bullish divergence). The indicator-based approach is more reliable for automated systems.

Candlestick Patterns in Algo Trading

Certain candlestick patterns have been statistically validated: Bullish Engulfing (65% success rate in uptrends), Morning Star (68% success rate at support), and Hammer (62% success rate after downtrends). These patterns can be programmed into algorithmic strategies as entry triggers, especially when combined with trend indicators like moving averages.

Combining Chart Patterns with Technical Indicators

The most effective approach combines pattern recognition with technical indicators. For example: look for a Bullish Engulfing candlestick at a key support level when RSI is below 30 and MACD histogram is turning positive. This multi-confirmation approach dramatically reduces false signals.

Algomaya's algo builder supports multiple indicator combinations that can capture the essence of chart patterns quantitatively. Build, backtest, and paper trade your pattern-based strategies with $100K virtual capital. Download free and explore our courses on technical analysis.

Developing Your Trading Edge

A trading edge is a statistical advantage that makes your strategy profitable over many trades. Unlike gambling where the house always has the edge, in trading you can develop your own edge through superior analysis, better risk management, or more disciplined execution. However, edges in financial markets are typically small, perhaps 2 to 5 percentage points of additional win rate, which means they only become apparent over large numbers of trades.

Identifying your edge requires honest assessment of what you do better than the average market participant. It could be deep knowledge of a specific sector, superior pattern recognition skills, a faster data pipeline, or simply better emotional control that prevents the costly mistakes most traders make. Understanding the source of your edge helps you know when it is working and when market conditions may have shifted to neutralize it.

Protecting your edge means avoiding the behaviors that erode it. Overtrading dilutes the quality of your setups. Revenge trading after losses leads to undisciplined entries. Abandoning your rules during winning streaks due to overconfidence introduces noise into your results. The discipline to take only the trades your system identifies, regardless of recent results, is itself a significant edge in markets dominated by emotional participants.

Edges can be temporary or permanent. Strategy-based edges tend to decay as more participants discover and trade them. Behavioral edges based on psychological discipline tend to be more durable because human psychology does not change. Building a trading approach that combines a sound strategy with strong behavioral discipline creates the most sustainable edge available to individual traders.

The Role of Technology in Modern Trading

Technology has democratized trading by giving individual traders access to tools that were once exclusive to institutions. Real-time data feeds, advanced charting platforms, algorithmic execution, and machine learning models are now available to retail traders at a fraction of the cost institutions paid a decade ago. This technological leveling has created unprecedented opportunities for well-prepared individual traders.

Automation reduces the two biggest sources of trading errors: emotional decision-making and execution delays. When your strategy is coded as an algorithm, it follows the rules perfectly every time without hesitation, second-guessing, or fear. It enters and exits at the exact conditions specified, manages position sizes precisely, and operates consistently regardless of recent wins or losses.

However, technology is a tool, not a substitute for understanding. An automated strategy is only as good as the logic it is programmed to follow. Blindly deploying algorithms without understanding their behavior in different market conditions is like driving a car with your eyes closed just because it has GPS. The technology amplifies your knowledge and discipline but cannot replace them.

Mobile trading technology has made it possible to manage positions from anywhere, which is both an advantage and a risk. The ability to monitor and adjust trades throughout the day provides better risk management. But constant market watching from your phone can lead to overtrading and anxiety. Set specific times to check your positions rather than monitoring them continuously, and use alerts for price levels that require action rather than watching every tick.

Getting Started with Algorithmic Trading on Algomaya

Algomaya provides everything you need to begin your algorithmic trading journey. The platform combines educational content, strategy development tools, and paper trading into an integrated learning experience designed specifically for traders who want to move beyond manual chart-reading to systematic, rules-based trading.

Start with the learning path to build your foundational knowledge of technical indicators, strategy development, and risk management. Each module includes interactive examples using real market data so you can see how concepts apply in practice, not just in theory.

Move to the strategy builder to create your own trading rules without writing code. Select from popular indicators like RSI, MACD, Bollinger Bands, and moving averages, define your entry and exit conditions, and backtest against historical data to see how your strategy would have performed. The backtesting engine provides key metrics like Sharpe ratio, maximum drawdown, and win rate so you can objectively evaluate your strategy.

Deploy your strategy on paper trading to test it with real-time market data. This bridges the gap between historical backtesting and live trading, letting you experience real-time decision-making and execution without financial risk. Track your results, refine your approach, and build the confidence that comes from a proven track record before considering any real capital deployment.

Avoiding Overfitting in Backtests

Overfitting is the most dangerous trap in backtesting. It occurs when your strategy is optimized so precisely for historical data that it captures noise rather than genuine market patterns. An overfitted strategy shows extraordinary historical returns but fails miserably in live trading because the random patterns it learned do not repeat.

The primary defense against overfitting is out-of-sample testing. Divide your historical data into two or more segments. Develop and optimize your strategy on the in-sample data, then test it on the out-of-sample data that the strategy has never seen. If performance degrades dramatically on out-of-sample data, your strategy is likely overfitted. A healthy strategy shows some performance decline but maintains its core edge across both segments.

Walk-forward optimization provides an even more rigorous test. Train your strategy on the first segment, test on the next, then retrain on segments one and two, test on three, and continue this rolling window approach. This simulates how the strategy would have performed in real time with periodic recalibration, giving you the most realistic estimate of future performance.

Parameter sensitivity analysis reveals overfitting. If your strategy only works with RSI period 13, stop loss at exactly 2.3 percent, and take profit at exactly 4.7 percent but fails with nearby values like RSI 12 or 14, it is overfitted. Robust strategies work across a range of parameter values, showing a plateau of good performance rather than a narrow spike at specific settings. Always test parameter neighborhoods, not just optimal values.

Reducing the number of rules and parameters in your strategy is the simplest way to avoid overfitting. A strategy with 3 parameters has far less room to overfit than one with 15. Every additional parameter gives the optimizer more degrees of freedom to curve-fit to historical noise. Follow the principle of parsimony: prefer simpler strategies that capture obvious market dynamics over complex ones that attempt to model every market nuance.

Practice this strategy risk-free

Algomaya lets you paper-trade RSI, MACD, Bollinger Bands, SMA, EMA and AI strategies on live US markets — free forever.

Download Algomaya Free

Disclaimer: This article is for educational purposes only and is not financial advice. Algomaya is not a registered investment adviser. All trading involves risk of loss.