AlgoDevStudio Logo AlgoDevStudio
Algorithmic Logic Series

The Ultimate Guide to Candlestick Patterns

From Hammer to Three Black Crows: Decoding market sentiment with logic.

Candlestick Patterns

Candlestick patterns are the visual language of price action. For algorithmic traders, they represent specific mathematical conditions that can signal reversals or continuations. Here is the complete list of essential patterns.

1. Bullish Reversal Patterns

Hammer

Hammer

A single candle pattern found at the bottom of a downtrend using a small body and long lower wick. Signals buyers rejecting lower prices.

Inverse Hammer

Inverse Hammer

Similar to the Hammer but with a long upper wick. While it looks bearish, in a downtrend context, it signals that buyers are starting to probe higher prices.

Bull Engulfing

Bullish Engulfing

Multiple candle pattern. A small red candle is followed by a large green candle that completely "engulfs" the previous body. Strong momentum shift.

Piercing Line

Piercing Line

A two-candle pattern. The first is a long red candle. The second is green, opens below the low of the first, but closes more than halfway up the first candle's body.

Morning Star

Morning Star

A 3-candle pattern signaling deep reversal. 1: Long Red. 2: Small gap-down Doji/Spinning Top. 3: Long Green closing well inside the first Red.

3 White Soldiers

Three White Soldiers

Three consecutive green candles with small wicks, each opening within the previous body and closing higher. A very strong bullish confirmation.

2. Bearish Reversal Patterns

Hanging Man

Hanging Man

Identical shape to the Hammer but occurs at the top of an uptrend. It signals that selling pressure is starting to outweigh buying pressure.

Shooting Star

Shooting Star

Small body at the bottom, long upper wick. Buyers tried to push price up but failed, and sellers took control by close. Classic bearish signal.

Bear Engulfing

Bearish Engulfing

A small green candle is followed by a large red candle that fully engulfs it. Indicates sellers have overwhelmed buyers.

Evening Star

Evening Star

The bearish version of the Morning Star. 1: Long Green. 2: Small gap-up Star. 3: Long Red closing down into the first candle's body.

3 Black Crows

Three Black Crows

Three consecutive long red candles with short wicks, each closing lower than the previous one. A sign of a severe market crash or downturn.

3. Continuation & Neutral Patterns

Doji

Doji

Open and Close are virtually equal. It represents market indecision. A Doji appearing after a strong trend often signals a potential reversal.

Spinning Top

Spinning Top

A candle with a small body centered between long upper and lower wicks. Like the Doji, it signals indecision and a battle between bulls and bears ending in a draw.

Bull Marubozu

Marubozu

A body with no wicks (shadows). A Bullish Marubozu (Green) means buyers controlled price from open to close. A Bearish Marubozu (Red) means sellers controlled it entirely.

Code These Patterns

Recognizing patterns is easy. Determining their probability in Python is where we come in.

Automate My Strategy