Skip to content
StatePath
Tool Atlasmarket.patterns

Tool

Candlestick Patterns

market.patterns

MarketEvent

Inputs

No typed inputs.

Outputs

Event list

An event list, not a true/false line: one event on each bar where the chosen pattern forms, carrying the bar index and the pattern's name (it does not say whether the shape is bullish or bearish). For a true/false signal or the shape's direction, use market.candlestick_patterns with interpretor.candlestick_pattern instead.

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 one event naming the pattern on that bar; it does not record whether the shape is bullish or bearish.

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