SuperCharting
Sign in Get started Account Open charts

Learn / Indicators

Candlestick patterns: the 44 pattern scripts and their alerts

The candlestick patterns in SuperCharting's library: hammer, engulfing, doji, morning star and 40 more, the trend filter, labels and pattern alerts.

SuperCharting's library has 44 candlestick pattern scripts, from Hammer and Engulfing to Three white soldiers and Abandoned baby, plus All candlestick patterns, which runs them together. Each one marks the candle where its pattern formed with a short label and a tooltip explaining the pattern, and each can send an alert. You find them under Indicators → Technicals → Patterns, after the chart patterns.

The pattern list

KindPatterns
Single-candle bullishHammer, Inverted hammer, Dragonfly Doji, Long lower shadow, Marubozu white
Single-candle bearishHanging man, Shooting star, Gravestone Doji, Long upper shadow, Marubozu black
NeutralDoji, Spinning top black, Spinning top white
Two-candle bullishEngulfing, Harami, Harami cross, Piercing, Kicking, Tweezer bottom, Doji star, Rising window
Two-candle bearishEngulfing, Harami, Harami cross, Dark cloud cover, Kicking, Tweezer top, Doji star, Falling window, On-neck
Three-candle and longerMorning star, Evening star, Morning Doji star, Evening Doji star, Abandoned baby (both), Tri-star (both), Three white soldiers, Three black crows, Rising three methods, Falling three methods, Upside Tasuki gap, Downside Tasuki gap

In the dialog each one is named with its direction, for example "Engulfing (bullish)" or "Doji (neutral)". The scripts carry the same names as TradingView's candlestick pattern built-ins.

How the scripts decide

The scripts compare each candle with an average body size: a 14-bar EMA of body length. A "small body" is smaller than that average, a "long body" larger. Shadows count when they are more than 5% of the body. Each pattern then has its own geometry. For example, a Hammer needs:

The trend filter

Reversal patterns only count in the right context. Detect Trend Based On has three options:

So a hammer shape above the 50 SMA is not labelled with the default setting. Switch to No detection if you want every shape marked.

How to add candlestick patterns in SuperCharting

  1. Open a chart, for example NSE:HDFCBANK on the 1D interval.
  2. Click Indicators, choose Technicals and then the Patterns chip.
  3. Type the pattern's name in Search, for example "engulf", and click Engulfing (bullish). Or click All candlestick patterns.
  4. Open Settings from the legend gear.
  5. In All candlestick patterns, set Pattern Type to Bullish, Bearish or Both, and untick the patterns you do not want.
  6. Set Detect Trend Based On and the label colours for bullish, bearish and neutral patterns.
  7. Click Ok.

Reading the labels

Each pattern is marked with a short code: "H" for Hammer, "BE" for Engulfing, "MS" for Morning star, "3WS" for Three white soldiers, "D" for Doji. Bullish labels sit below the candle and bearish ones above. Hover a label for the pattern's name and a description. The single-pattern scripts also tint the background of the candles that make up the pattern.

Alerts on candlestick patterns

Unlike the chart-pattern scripts, every candlestick script defines an alert:

Steps

  1. Add the pattern script to the chart, for example Hammer (bullish) on EURUSD 1h.
  2. In its legend's More menu choose Add alert on ….
  3. Pick New pattern detected (or a named pattern in the combined script).
  4. Set Trigger to Once per bar close. A pattern is only complete when its last candle closes.
  5. Choose Expiration and notifications, then click Create.

An alert runs the script with its default inputs, so the alert uses the SMA50 trend rule even if you changed it in Settings. To alert on your own rule, copy the pattern into a script of your own. This example marks inside bars whose previous "mother" bar was at least 0.3% of price tall:

//@version=6
indicator("Inside bar finder", "Inside bar", overlay = true)
minRangePct = input.float(0.3, "Mother bar range (% of price)", minval = 0, step = 0.1)
motherRange = high[1] - low[1]
inside = high < high[1] and low > low[1] and motherRange >= close[1] * minRangePct / 100
plotshape(inside, "Inside bar", shape.circle, location.abovebar, color.orange, size = size.tiny)
alertcondition(inside, "Inside bar", "Inside bar found")

Save it in the Script Editor and add it from My scripts. Write your first indicator walks through each line of a script like this, and price alerts covers the alert dialog in full.

Using candlestick patterns sensibly

Nothing on this page is a recommendation to buy or sell.

Frequently asked questions

Why is a hammer on my chart not labelled?

The default trend filter only accepts a hammer when the close is below the 50-bar SMA. Set Detect Trend Based On to No detection to see every hammer shape.

Do the patterns work on Heikin Ashi candles?

Heikin Ashi candles are averaged and rarely have the bodies and shadows these rules expect. For candlestick patterns use regular candles; see chart types.

Can I use All candlestick patterns and still alert on just one?

Yes. Its alert list has one condition per pattern. Pick only the pattern you want.

Does a label ever disappear?

A pattern is judged on closed candles. While the last candle of a pattern is still forming, the label can appear and disappear as price moves. Once that candle closes, it stays.

Try it on a live chart

SuperCharting runs in your browser: charts, Pine-compatible scripts, the Strategy Tester, alerts and the screener, with Indian and global markets.

Create a free account More guides