Skip to content
StatePath
Tool Atlasmarket.patterns

Tool

Candlestick Patterns

market.patterns

MarketEvent

Inputs

No typed inputs.

Outputs

Event list

A per-bar event feed of the chosen pattern, each event carrying its bullish or bearish bias. Pass it to interpretor.candlestick_pattern to turn the shape into a signal, or read it directly as a boolean 'pattern present this bar'.

A focused candlestick detector for three of the most-used single- and two-candle shapes: engulfing, doji and hammer. You pick which one to watch and it flags every bar where that shape appears.

Candlestick Patterns overview diagramcandle.engulf_body

How it works

It reads each bar's open, high, low and close, measures the body and the upper and lower wicks, and tests those proportions against the rule for the pattern you selected. When a bar (or pair of bars) matches, it emits the pattern as an event with its bullish or bearish lean.

Modes

Engulfingengulfing

Flags a two-candle reversal where the second candle's body fully swallows the first candle's body in the opposite direction — a bullish engulfing after a fall, a bearish engulfing after a rise.

Engulfing diagramcandle.engulf_body

When to use: When you want a strong, momentum-style reversal cue that confirms a clear shift of control between buyers and sellers.

Dojidoji

Flags an indecision candle whose open and close are almost equal, leaving a tiny body with wicks on one or both sides — a sign that neither side won the bar.

Doji diagramcandle.upper_wickcandle.flat_bodycandle.lower_wick

When to use: When you want to spot stalling momentum or a potential turning point, especially after an extended move into support or resistance.

Hammerhammer

Flags a single candle with a small body near the top and a long lower wick, showing that price was pushed down during the bar but rejected back up before the close — a bullish rejection of lower prices.

Hammer diagramcandle.long_lower_wick

When to use: When you want a bottom-fishing reversal cue at support after a decline, where a long lower wick signals buyers stepping in.

Configuration

patternenum

Which candlestick shape to detect: 'engulfing' (a two-candle body-swallow reversal), 'doji' (an open≈close indecision candle), or 'hammer' (a small body with a long lower rejection wick). Only the selected pattern is reported.

Choices:engulfingdojihammer

Connects to

Feeds into

Examples

  • Reversal trigger: select 'engulfing' and fire a long when a bullish engulfing prints after a pullback.
  • Indecision filter: select 'doji' and avoid new entries on bars where price stalls into a key level.

Common mistakes

  • Treating every hammer or doji as an automatic reversal — without trend or location context (e.g. at support) these single candles fire often and fail often.
  • Expecting more shapes than the three offered: for the full library of named formations (stars, dark-cloud, tweezers, marubozu, …) use market.candlestick_patterns instead.

See also