BullScript: Candle Pattern Functions

Candle Pattern Functions

This section describes a number of functions built into BullScript designed to identify candle patterns. Unless otherwise stated, each function returns true if the pattern is completed on the current bar.

It is important to realize that all of our reversal candle patterns must be preceded by an up or down trend. The WebLink definition of a trend follows that given in the Securities Institute Technical Analysis course notes section 3, page 9.

This states briefly that:

  • An uptrend is a succession of higher highs and higher lows. An uptrend is only ended when a candle with a lower high AND a lower low than the previous candle is encountered.
  • A downtrend is a succession of lower lows and lower highs. A downtrend is only ended when a candle with a higher high AND higher low than the previous candle is encountered.

Abandoned Baby Bottom

Usage

BULLABANDONEDBABY

Description

This a very rare Morning Doji Star varation where the star’s upper shadow does not overlap the first or third candles lower shadows.

An Abandoned Baby Bottom is a bottom reversal pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p70.

Example

See Also

Abandoned Baby Top | Candle Patterns | Doji | Morning Doji Star

Abandoned Baby Top

Usage

BEARABANDONEDBABY

Description

This a very rare Evening Doji Star varation where the star’s lower shadow does not overlap the first or third candles upper shadows.

An Abandoned Baby Top is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p70.

Example

See Also

Abandoned Baby Bottom | Candle Patterns | Doji | Evening Doji Star

Bearish Harami

Usage

BEARHARAMI

Description

A small real body of either colour which is contained within the prior large white body.

This is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p82.

Example

See Also

Bear Harami Cross | Bull Harami | Bull Harami Cross | Candle Patterns

Bearish Harami Cross

Usage

BEARHARAMICROSS

Description

A Doji which is contained within the prior large white body.

This is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p83.

Example

See Also

Bear Harami | Bull Harami | Bull Harami Cross | Candle Patterns | Doji

Bearish Belt Hold

Usage

BEARBELTHOLD

Description

A strong black candle that opens on the high of the session and closes on the low of the session.

This is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p93.

Example

See Also

Bullish Belt Hold | Candle Patterns

Bearish Counter Attack

Usage

BEARCOUNTERATTACK

Description

A large white candle followed by a black candle which opens sharply higher but closes at the prior white candle’s close.

A Bearish Counter Attack is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p109.

Example

See Also

Candle Patterns | Bullish Counter Attack

Bearish Separating Line

Usage

BEARSEPARATINGLINE

Description

A white candle followed by a black candle with the same opening.

Bearish Separating Lines are a bearish continuation pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p150.

Example

See Also

Candle Patterns | Bullish Separating Line

Big

Usage

BIG

Description

Returns true on bars where the candle is big. BullCharts considers a candle to be big if the Close price is difference to the Open price by 1.5% or greater. (The candle can be black or white).

Example

Big returns true on a day that opens at $3.00 and closes at $2.50.

Big Black

Usage

BIGBLACK

Description

A large black body, where the open is near the high, and the close is near the low.

Example

See Also

Big White | Candle Patterns

Big White

Usage

BIGWHITE

Description

A large white body, where the open is near the low, and the close is near the high.

Example

See Also

Big Black | Candle Patterns

Black Body

Usage

BLACK

Description

A candlestick which has a black body.

Example

See Also

White Body | Candle Patterns

Bull Harami

Usage

BULLHARAMI

Description

A small real body of either colour which is contained within the prior large black body.

This is a bottom reversal pattern and as such should be preceded by an downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p82.

Example

See Also

Bear Harami | Bear Harami Cross | Bull Harami Cross | Candle Patterns

Bullish Harami Cross

Usage

BULLHARAMICROSS

Description

A Doji which is contained within the prior large black body.

This is a bottom reversal pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p83.

Example

See Also

Bear Harami | Bear Harami Cross | Bull Harami | Candle Patterns | Doji

Bullish Belt Hold

Usage

BULLBELTHOLD

Description

A strong white candle that opens on the low of the session and closes on the high of the session.

This is a bottom reversal pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p93.

Example

See Also

Bearish Belt Hold | Candle Patterns

Bullish Counter Attack

Usage

BULLCOUNTERATTACK

Description

A large black candle followed by a white candle which opens sharply lower but closes at the prior black candles close.

A Bullish Counter Attack is a bottom reversal pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p109.

Example

See Also

Candle Patterns | Bearish Counter Attack

Bullish Separating Line

Usage

BULLSEPARATINGLINE

Description

A black candle followed by a white candle with the same opening.

Bullish Separating Lines are a bullish continuation pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p150.

Example

See Also

Candle Patterns | Bearish Separating Line

Dark Cloud Cover

Usage

DARKCLOUDCOVER

Description

A strong white candle followed by a black candle that opens above the high of the white candle and closes at least 50 percent into the white candle’s real body.

Note that if the black candle completely engulfs the white candle’s real body then this is not Dark Cloud Cover but a Bearish Engulfing Pattern.

Dark Cloud Cover is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p49.

Example

See Also

Candle Patterns | Engulfing Bear

Doji

Usage

DOJI

Description

A candlestick where the open and close are the same. Doji can be powerful reversal lines when preceded by a trend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p155.

Example

See Also

Candle Patterns | Doji Star

Doji Star

Usage

DOJISTAR

Description

A Doji which gaps above a white candlestick, or below a black candlestick.

Example

See Also

Candle Patterns | Doji | Evening Doji Star | Morning Doji Star | Shooting Star

Doji Star Down

Usage

DOJISTARDOWN

Description

Returns true when a doji gaps below the large black real body preceeding it.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p155.

Example

See Also

Doji | Doji Star | Doji Star Up | Gap Down From Black | Star Down

Doji Star Up

Usage

DOJISTARUP

Description

Returns true when a doji gaps above the large white real body preceeding it.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p155.

Example

See Also

Doji | Doji Star | Doji Star Down | Gap Up From White | Star Up

Downward Gapping Tasuki

Usage

TASUKIDOWN

Description

A falling window formed by a black candle followed by a white candle of similar size which opens inside the black candles real body and closes above the black candles open. The white candle should not close the falling window for this pattern to be considered valid.

Note that we follow the strict definition (see the reference) that the falling window remains open until there is a close above the high of the window.

The Downward Gapping Tasuki is a downward continuation pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p135.

Example

See Also

Candle Patterns | Upward Gapping Tasuki

Dragonfly Doji

Usage

DRAGONFLYDOJI

Description

A Doji where there is no upper shadow and an extremely long lower shadow.

Dragonfly doji are used as bottom reversal lines and as such should be preceded by an downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p162.

Example

See Also

Candle Patterns | Doji

Engulfing Bear

Usage

ENGULFINGBEAR

Description

A large black real body that contains a small real white body that precedes it. Also known as the Bearish Engulfing Pattern.

Example

See Also

Candle Patterns | Engulfing Bull

Engulfing Bull

Usage

ENGULFINGBULL

Description

A large white real body that contains a small real black body that precedes it. Also known as the Bullish Engulfing Pattern.

This is a bottom reversal pattern and as such should be preceded by an downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p42.

Example

See Also

Candle Patterns | Engulfing Bear

Evening Doji Star

Usage

EVENINGDOJISTAR

Description

An Evening Star where the second candlestick is a Doji.

This is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p70.

Example

See Also

Candle Patterns | Doji | Doji Star | Evening Star | Morning Doji Star

Evening Star

Usage

EVENINGSTAR

Description

A large white candlestick followed by a small real body of either colour that gaps up from the previous candles real body. This is followed by a third candlestick that is black and has a close lower than the half way point of the first candlesticks real body.

The ideal evening star pattern’s third candle will gap below the preceding candles small real body but in practice (as described by Nison) this is somewhat rare. We specifically allow the case of the third candle engulfing the second to also satisfy the evening star pattern.

This is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p66.

Example

See Also

Candle Patterns | Evening Doji Star | Morning Star

Falling Three

Usage

BEAR3FORMATION

Description

This is a strong black candle in a falling window, followed by three candles of any colour that fall within the high/low range of the strong black candle, followed by another strong black candle that closes below the close of the first black candle.

This is a bearish continuation pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p142.

Example

See Also

Candle Patterns | Rising Three

Falling Window

Usage

FALLINGWINDOW

Description

A gap between the low of the first candlestick and the high of the second candlestick.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p126.

Example

See Also

Candle Patterns | Rising Window

Gap Down From Black

Usage

GAPDOWNFROMBLACK

Description

Returns true when the current candle gaps below the downtrending large black real body preceeding it.

Reference

Japanese Candlestick Charting Techniques – Steve Nison

Example

See Also

Gap Up From White | Star Down

Gap Up From White

Usage

GAPDOWNFROMBLACK

Description

Returns true when the current candle gaps above the uptrending large white real body preceeding it.

Reference

Japanese Candlestick Charting Techniques – Steve Nison

Example

See Also

Gap Down From Black | Star Up

Gravestone Doji

Usage

GRAVESTONEDOJI

Description

A Doji where there is no lower shadow and an extremely long upper shadow.

Gravestone doji are used as a top reversal line and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p162.

Example

See Also

Candle Patterns | Doji

Hammer

Usage

HAMMER

Description

A small real body of either colour with a lower shadow at least twice the real body size, which closes nears the high.

In practice there is some latitude for what constitutes ‘a small real body’. The most important aspect of this pattern is the long lower shadow with a minimal upper shadow.

The Hammer is a bottom reversal pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p34.

Example

See Also

Candle Patterns | Hanging Man | Inverted Hammer

Hanging Man

Usage

HANGINGMAN

Description

A small real body of either colour with a lower shadow at least twice the real body size, which closes nears the high. The main difference between this pattern and the Hammer is the prior trend direction. The Hammer requires a prior uptrend but the Hanging man requres a prior downtrend.

Note that because of the bullish nature of the long lower shadow additional confirmation may be required before this pattern is considered bearish.

The Hanging Man is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p39.

Example

See Also

Candle Patterns | Hammer

Inverted Hammer

Usage

INVHAMMER

Description

An upside-down Hammer that is either white or black.

This is a bottom reversal line and as such should be preceded by a decline.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p74.

Example

See Also

Candle Patterns | Hammer

Long Legged Doji

Usage

LONGLEGGEDDOJI

Description

A Doji that has particularly long upper and lower shadows.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p161.

Example

See Also

Candle Patterns | Doji

Long Lower Shadow

Usage

LONGLOWERSHADOW

Description

A candlestick, either black or white, that has a lower shadow that is more than twice as long as the upper shadow and body.

Example

See Also

Candle Patterns | Long Upper Shadow

Long Upper Shadow

Usage

LONGUPPERSHADOW

Description

A candlestick, either black or white, that has an upper shadow that is more than twice as long as the lower shadow and body.

Example

See Also

Candle Patterns | Long Lower Shadow

Morning Doji Star

Usage

MORNINGDOJISTAR

Description

A Morning Star where the second candlestick is a Doji.

This is a bottom reversal pattern and as such should be preceded by an downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p70.

Example

See Also

Candle Patterns | Doji | Doji Star | Evening Doji Star | Morning Star

Morning Star

Usage

MORNINGSTAR

Description

A large black candlestick followed by a small real body of either colour that gaps down from the previous candles real body. This is followed by a third candlestick that is white and has a close higher than the half way point of the first candlestick’s real body.

The ideal morning star pattern’s third candle will gap above the preceeding candle’s small real body but in practice (as described by Nison) this is somewhat rare. We specifically allow the case of the third candle engulfing the second to also satisfy the morning star pattern.

This is a bottom reversal pattern and as such should be preceded by an downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p62.

Example

See Also

Candle Patterns | Evening Star | Morning Doji Star

Piercing Pattern

Usage

PIERCINGLINE

Description

A stong black candle followed by a white candle that opens below the low of the prior black candle but closes more than halfway into the black candles real body. Also known as a Piercing Line.

Note that if the real body of the white candle engulfs the prior black candles real body then this is not a Piercing Pattern but a Bullish Engulfing Pattern.

The Piercing Pattern is a bottom reversal pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p55.

Example

See Also

Candle Patterns

Real Body Gap Down

Usage

REALBODYGAPDOWN

Description

This function returns true when the body of the current candle has gapped down below the body of the previous candle. That is, both the Open and Close are lower than both the previous Open and Close.

Reference

Japanese Candlestick Charting Techniques – Steve Nison

Example

See Also

Real Body Gap Up

Real Body Gap Up

Usage

REALBODYGAPUP

Description

This function returns true when the body of the current candle has gapped up from the body of the previous candle. That is, both the Open and Close are higher than both the previous Open and Close.

Reference

Japanese Candlestick Charting Techniques – Steve Nison

Example

See Also

Real Body Gap Down

Rising Three

Usage

BULL3FORMATION

Description

This is a strong white candle in a rising window, followed by three candles or any colour that fall within the high/low range of the strong white candle, followed by another strong white candle that closes above the close of the first white candle.

This is a bullish continuation pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p142.

Example

 

See Also

Candle Patterns | Falling Three

Rising Window

Usage

RISINGWINDOW

Description

A gap between the high of the first candlestick and the low of the second candlestick.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p126.

Example

See Also

Candle Patterns | Falling Window

Shaven Bottom

Usage

SHAVENBOTTOM

Description

A candlestick, either white or black, which has no lower shadow.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p25.

Example

See Also

Candle Patterns | Shaven Head

Shaven Head

Usage

SHAVENHEAD

Description

A candlestick, either white or black, which has no upper shadow.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p85.

Example

See Also

Candle Patterns | Shaven Bottom

Shooting Star

Usage

SHOOTINGSTAR

Description

A small real body that closes near the bottom of its range and has a long upper shadow. There must be a real body gap up from the previous sessions candle.

This is a top reversal line and as such should be preceded by a rally.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p74.

Example

See Also

Candle Patterns | Doji Star

Small Real Body

Usage

SMALLREALBODY

Description

The difference between open and close is less than 0.3 percent of the opening price.

Reference

Japanese Candlestick Charting Techniques – Steve Nison

Example

See Also

Doji

Star Down

Usage

STARDOWN

Description

A small real body that gaps below the large black real body preceeding it.

Reference

Japanese Candlestick Charting Techniques – Steve Nison

Example

See Also

Doji Star Down | Gap Down From Black | Small Real Body | Star Up

Star Up

Usage

STARUP

Description

A small real body of either colour that gaps above the large white real body preceeding it.

Reference

Japanese Candlestick Charting Techniques – Steve Nison

Example

See Also

Doji Star Up | Gap Up From White | Small Real Body | Star Down

Three Black Crows

Usage

THREEBLACKCROWS

Description

Three long black candlesticks that each have lower close prices than the last. They generally close at or near their low prices.

This is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p97.

Example

See Also

Candle Patterns | Three White Soldiers

Three White Soldiers

Usage

THREEWHITESOLDIERS

Description

Three long white candlesticks that each have higher close prices than the last. They generally close at or near their high prices.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p99.

Example

See Also

Candle Patterns | Three Black Crows

Tri-Star Bottom

Usage

TRISTARBOTTOM

Description

The Tri-Star Bottom is a very rare pattern comprised of three doji where the second is lower than the first and third.

The Tri-Star Bottom is a bottom reversal pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p170.

Example

See Also

Candle Patterns | Doji | Tri-Star Top

Tri-Star Top

Usage

TRISTARTOP

Description

The Tri-Star Top is a very rare pattern comprised of three doji where the second is higher than the first and third.

The Tri-Star Top is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p170.

Example

See Also

Candle Patterns | Doji | Tri-Star Bottom

Tweezer Bottoms

Usage

TWEEZERBOTTOMS

Description

A large black candle followed by a candle with the same low.

Tweezer Bottoms are a bottom reversal pattern and as such should be preceded by a downtrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p87.

Example

See Also

Candle Patterns | Tweezer Tops

Tweezer Tops

Usage

TWEEZERTOPS

Description

A large white candle followed by a candle with the same high.

Tweezer Tops are a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p87.

Example

See Also

Candle Patterns | Tweezer Bottoms

Upside Gap two Crows

Usage

UPSIDEGAPTWOCROWS

Description

A large white candle followed by a small black candle whose real body gaps above the prior white candles real body. This is followed by another black candle which engulfs the prior black candle.

It is important to note that our definition allows for the third black candle to close into the first white candle. This follows the definition given in the reference more closely where the ‘upside gap’ refers to the gap between the first two real bodies only.

The Upside Gap Two Crows is a top reversal pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p95.

Example

See Also

Candle Patterns

Upward Gapping Tasuki

Usage

TASUKIUP

Description

A rising window formed by a white candle followed by a black candle of similar size which opens inside the white candles real body and closes below the white candles open. The black candle should not close the rising window for this pattern to be considered valid.

Note that we follow the strict definition (see the reference) that the window remains open until there is a close under the low of the window.

The Upward Gapping Tasuki is a upward continuation pattern and as such should be preceded by an uptrend.

Reference

Japanese Candlestick Charting Techniques Second Edition – Steve Nison, p135.

Example

See Also

Candle Patterns | Downward Gapping Tasuki

White Body

Usage

WHITE

Description

A white candlestick. That is, where the close was higher than the open.

Example

See Also

Black Body | Candle Patterns

Was this article helpful?

Related Articles