0% found this document useful (0 votes)
148 views33 pages

Candlestick Patterns Overview

Uploaded by

ant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views33 pages

Candlestick Patterns Overview

Uploaded by

ant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • About Me
  • Introduction
  • What is a Candlestick?
  • What are Bullish Candlestick Patterns?
  • What are Bearish Candlestick Patterns?
  • What are Inconclusive Candlestick Patterns?
  • What filters will determine a true signal?
  • Short Term Up/Down Trends
  • Moving Average Support/Resistance
  • How to import Custom Blocks into SQX?

The Ultimate Guide to Candlestick Patterns

THE ULTIMATE GUIDE TO


CANDLESTICK PATTERNS

More than 26 Custom blocks coded for


Strategy Quant X and description companion
color eBook.

[Link] 1
The Ultimate Guide to Candlestick Patterns

Hello, my name is A. Casey

I am an algorithmic trader, which is a fancy way to say that I trade


multiple mechanical systems. These systems follow explicit rules with
no human intervention. I have been trading for a long time, and
recently, it is slowly becoming my full-time activity. I love the financial
markets and I have gathered a great amount of knowledge and
experience through the years via hundreds of hours or reading,
researching, experimenting, trading and learning from the best. I
founded [Link] to help other algo traders on their journey to
profitability.

Through my endeavor to automate the process of building, testing,


deploying, monitoring my trading systems, I stumbled up on Strategy
Quant X among many other software packages. I did a trial with most of
them, but I chose SQX for it’s all around features. While it is not perfect,
and it will never be the only solution out there, but it is the best of

[Link] 2
The Ultimate Guide to Candlestick Patterns

what’s available in the current market in this niche, and they are
constantly updating it, so that is a huge plus. In the beginning, I tried to
find some learning materials about SQX, as it is difficult to grasp
because it is very customizable, and extremely powerful, but I could not
find anything, specially in English.

So, after hours and hours of learning and months of testing, I became
very knowledgeable of the package and I decided to share my
knowledge with other traders using the package, hoping to help you get
the most out of it.

Keep an eye on my channels for more great material to help you


achieve the success you aspire to reach.

---------------------------------------------------------------------

▹Subscribe to my YouTube channel | [Link]

▹Check out my website | [Link]

▹Read my blog | [Link]

▹Twitter | [Link]

▹Instagram | [Link]

▹Business Enquiries | info@[Link]

Join Algo Trading Master Class | [Link]


trading-masterclass

Grab your $200 discount on top of what SQX is offering here:


[Link]

For other helpful SQX videos, watch this playlist:


[Link]

[Link] 3
The Ultimate Guide to Candlestick Patterns

Contents
About me ------------------------------------------------------------------------ (2)

Introduction -------------------------------------------------------------------- (6)

What is a Candlestick? ------------------------------------------------------ (7)

What are Bullish Candlestick Patterns? ------------------------------- (9)

Hammer [1] ------------------------------------------------------------------ (10)

Bullish Engulfing [3] ------------------------------------------------------- (10)

Bullish Piercing [5] --------------------------------------------------------- (10)

Bottom Tweezers [7] ----------------------------------------------------- (11)

Bullish Harami [9] --------------------------------------------------------- (11)

Bullish Marubozu [11] --------------------------------------------------- (11)

Three White Soldiers [13] ---------------------------------------------- (13)

Rising Three Methods [15] --------------------------------------------- (13)

Down Gap with Two Soldiers [17] ----------------------------------- (13)

Bullish Sandwich [19] ---------------------------------------------------- (14)

What are Bearish Candlestick Patterns? ------------------------------ (15)

Shooting Star [2] ---------------------------------------------------------- (16)

Bearish Engulfing [4] ---------------------------------------------------- (16)

Dark Cloud [6] ------------------------------------------------------------- (16)

Top Tweezers [8] --------------------------------------------------------- (17)

Bearish Harami [10] ----------------------------------------------------- (17)

[Link] 4
The Ultimate Guide to Candlestick Patterns

Bearish Marubozu [12] ------------------------------------------------- (17)

Three Black Crows [14] -------------------------------------------------- (19)

Falling Three Methods [16] ------------------------------------------- (19)

Upside Gap with Two Crows [18] ----------------------------------- (19)

Bearish Sandwich [20] -------------------------------------------------- (20)

What are Inconclusive Candlestick Patterns? ---------------------- (21)

Spinning Top [21] --------------------------------------------------------- (22)

Doji [22] ---------------------------------------------------------------------- (22)

Dragonfly Doji [23] ------------------------------------------------------- (22)

Gravestone Doji [24] ----------------------------------------------------- (23)

What Filters Will Determine True Signal? ---------------------------- (24)

Short Term Up Trend [25] --------------------------------------------- (25)

Short Term Down Trend [26] ----------------------------------------- (25)

Moving Average [27] ----------------------------------------------------- (27)

How to Import Custom Blocks into SQX ------------------------------- (29)

[Link] 5
The Ultimate Guide to Candlestick Patterns

Introduction
Candlestick charts originated in Japan in the 1700. Hundreds of books
have been written on the subject. I am not going to show you charts
with each pattern and tell you about the perfect setup, as that is left to
the internet gurus . instead I will show you what each pattern looks
like, it’s code in plain text, and what the general knowledge of it’s
meaning as per public domain, but for us quants, we don’t care what
they say as we need to test each pattern validity to see if they are of
benefit to incorporate them inside a trading algorithm.

I have compiled the most popular candle patterns available into SQX
custom blocks to be used inside Strategy Quant X builder.

You can use those blocks separately to test their validity on any
instrument or test them with other blocks to build trading systems.
Also, you can combine them with other convergence point as you will
see at the end with filters (page 24).

Does bearish engulfing pattern mean you have to sell your long
position or start a new short position? Don’t follow the gurus on the
subject, instead test them yourself.

With the blocks I coded for you, you have no excuse not to test.

[Link] 6
The Ultimate Guide to Candlestick Patterns

What is a Candle Stick?


It is a visual way to represent what happen to an instrument price in a
certain time interval.

The structure of candlesticks is shown in figure (1). Candlestick is a bar


with four points that shows Open, High, Low, Close for a certain time
interval, like 5 minutes, 4 hours or 1 year. The area between Open &
Close is called Body. The area between High/Low & Open/Close is called
Wick or Shadow.

If the close is greater than the open then the candle is up, and if the
close is less than the open then the candle is down. Of course, bar high

[Link] 7
The Ultimate Guide to Candlestick Patterns

is always higher than bar low. Some charts represent an UP candle as


filled green or hallow bar and DOWN candle as filled red or black.

Green (or Hallow) candlesticks gives the indication that buyers are more
than sellers in that timeframe at that time of day when it happened.
The wicks (or shadows) provide further information, if green body is big
and wicks are small or nonexistent then we know the buyers where in
full control of that time interval. The reverse for Red (or Black)
candlesticks.

There are few more nuances, like how big is the bar? how far is close to
open? how big is the body? how big is the range compared to last
number of bars?

With all the above information, you can see that you can make up
hundreds of candlestick patterns. We will not be testing all the possible
patterns, instead we will focus on twenty-six patterns.

Also I will not go into the psychology of why these patterns exist,
instead we will focus on how to build patterns into custom blocks and
test the validity of each pattern on different timeframes, also we will
use those blocks separately or in combination with other blocks to
build strategies with them.

If you want to know exactly why they happen and how to look for them,
then search it online as we are not going to look at any charts, instead
we are going to test them quantitatively in different scenarios, time
frames, instruments and combinations. So we are only concerned with
how to code them, and to use them inside Strategy Quant X.

[Link] 8
The Ultimate Guide to Candlestick Patterns

What are Bullish Patterns?


Below figure (2) shows candlesticks that are considered as bullish
patterns. You might find different names and different interpretations
of these patterns, also there might be very close derivatives of them.

[Link] 9
The Ultimate Guide to Candlestick Patterns

Hammer #1
# of Bars: 1

Logic: body[1] < 20% of range[1] | body is in top 25% of bar | C[1] >
O[1] (optional)

Interpretation: if it is at the bottom of a down move, then most likely


selling pressure is drying up and buying pressure is coming in. You can
add more weight if the close is higher than the open.

Bullish Engulfing #3
# of Bars: 2

Logic: C[2] < O[2] | C[1] > O[1] | O[1] < C[2] | C[1] > O[2] | body[2] >
70% range[2]

Interpretation: if it is at the bottom of a down move, then most likely


selling pressure is drying up and buying pressure is coming in. Price
gap down but manage to close above yesterday open.

Bullish Piercing #5
# of Bars: 2

Logic: C[2] < O[2] | body[2] > 70% range[2] | O[1] < L[2] | C[1] > ( 50%
range[2] + L[2] )

Interpretation: a significant gap down then strong buying pressure


that pierce mid-price of previous bar.

[Link] 10
The Ultimate Guide to Candlestick Patterns

Bottom Tweezers #7
# of Bars: 2

Logic: range[2] >= ATR(22)[3] | body[2] > 75% range[2] | O[1] = C[2] |
C[1] > O[1] | body[2] >= body[1]

Interpretation: during a down swing, price closes at the low, then next
day sentiment is changed and eliminate most of the losses from
previous day.

Bullish Harami or Bullish Inside Bar #9


# of Bars: 2

Logic: range[2] >= ATR(22)[3] | body[2] > 75% range[2] | C[2] < O[2] |
O[1] > C[2] | C[1] < O[2] | C[1] > O[1] | body[1] < 25% body[2]

Interpretation: during a down swing, price closes at the low, then next
day a sign of changing momentum happens with a gap up and up close.

Bullish Marubozu #11


# of Bars: 1

Logic: range[1] >= ATR(22)[2] | C[1] = H[1] | O[1] = L[1]

Interpretation: the word Marubozu means bald head in Japanese (no


wicks). The fact there are no wicks means buyers controlled the session
all the way.

[Link] 11
The Ultimate Guide to Candlestick Patterns

Below fig (4) shows three or more bars with bullish patterns

[Link] 12
The Ultimate Guide to Candlestick Patterns

Three White Soldiers #13


# of Bars: 3

Logic: range[3,2,1] >= ATR(22)[4] | body[3,2,1] > 75% range[3,2,1] |


C[3,2,1] > O[3,2,1] | C[1] > C[2] > C[3]

Interpretation: three consecutive long bars with small or no wicks,


after a downtrend it is very strong bullish signal that shows steady
buying pressure.

Rising Three Methods #15


# of Bars: 5

Logic: range[4,3,2] < ATR(22)6 | range [5,1] >= ATR(20) | C[4,3,2] <
O[4,3,2] | Lowest L[4,3,2] > O[5] | Highest H[4,3,2] < C[1] | C[5,1] >
O[5,1] | body [5,1] > 75% range[5,1]

Interpretation: three short down bars that are sandwiched within


range of two long up bars. Despite some selling pressure, buyers
stayed in control of the market.

Down Gap with Two Soldiers #17


# of Bars: 3

Logic: range[3,1] > ATR(22)[4] | body[3,1] > 75% range[3,1] | C[3] < O[3]
C[1] > O[1] | C[2] < O[2] | O[2] < C[3] | O[1] < C[2] | C[1] > H[2] | C[1] <
O[3]

Interpretation: a gap in a downtrend with an engulfing bar usually


indicates a corrective reversal within a downtrend.

[Link] 13
The Ultimate Guide to Candlestick Patterns

Bullish Sandwich #19


# of Bars: 3

Logic: range[3,2,1] > ATR(22)[4] | C[3] < O[3] | C[1] < O[1] | C[2] > O[2]
| body[3,2,1] > 75% range[3,2,1] | C[3] = C[1] = O[2] +/- 10% ATR(22)[4]

Interpretation: a support level is created when three long bars have


closely equal Close/Open in a downtrend.

[Link] 14
The Ultimate Guide to Candlestick Patterns

What are Bearish Patterns?


Below figure (3) shows candlesticks that are considered as bearish
patterns. Like I mentioned in previous page, You might find different
names and different interpretations of these patterns, also there might
be very close derivatives of the same patterns.

[Link] 15
The Ultimate Guide to Candlestick Patterns

Shooting Star or Inverse Hammer #2


# of Bars: 1

Logic: body[1] < 20% of range[1] | body is in bottom 25% of bar | C[1] <
O[1] (optional)

Interpretation: if it is at the top of an up move, then most likely buying


pressure is drying up and selling pressure is coming in. You can add
more weight if the close is lower than the open.

Bearish Engulfing #4
# of Bars: 2

Logic: C[2] > O[2] | C[1] < O[1] | O[1] > C[2] | C[1] < O[2] | body[2] >
70% range[2]

Interpretation: if it is at the top of an up move, then most likely buying


pressure is drying up and selling pressure is coming in. Price gap up but
manage to close below yesterday open.

Dark Cloud or Bearish Piercing #6


# of Bars: 2

Logic: C[2] > O[2] | body[2] > 70% range[2] | O[1] < L[2] | C[1] > ( 50%
range[2] + L[2] )

Interpretation: a significant gap up then strong selling pressure that


pierce mid-price of previous bar.

[Link] 16
The Ultimate Guide to Candlestick Patterns

Top Tweezers #8
# of Bars: 2

Logic: range[2] >= ATR(22)[3] | body[2] > 75% range[2] | C[1] > O[1] |
O[1] = C[2] | C[1] < O[1] | body[2] >= body[1]

Interpretation: during an upswing, price closes at the high, then next


day sentiment is changed and eliminate most of the gains from
previous day.

Bearish Harami or Bearish Inside Bar #10


# of Bars: 2

Logic: range[2] >= ATR(22)[3] | body[2] > 75% range[2] | C[2] > O[2] |
O[1] < C[2] | C[1] > O[2] | C[1] < O[1] | body[1] < 25% body[2]

Interpretation: during a down swing, price closes at the low, then next
day a sign of changing momentum happens with a gap up and up close.

Bearish Marubozu #12


# of Bars: 1

Logic: range[1] >= ATR(22)[2] | C[1] = L[1] | O[1] = H[1]

Interpretation: the word Marubozu means bald head in Japanese (no


wicks). The fact there are no wicks means sellers controlled the session
all the way.

[Link] 17
The Ultimate Guide to Candlestick Patterns

Below Fig (5) shows three or more bars with bearish


patterns

[Link] 18
The Ultimate Guide to Candlestick Patterns

Three Black Crows #14


# of Bars: 3

Logic: range[3,2,1] >= ATR(22)[4] | body[3,2,1] > 75% range[3,2,1] |


C[3,2,1] < O[3,2,1] | C[1] < C[2] < C[3]

Interpretation: three consecutive long down bars with small or no


wicks, after an uptrend is very strong bearish signal that shows steady
selling pressure.

Falling Three Methods #16


# of Bars: 5

Logic: range[4,3,2] < ATR(22)[6] | range [5,1] >= ATR(22)[6] | body[5,1] >
75% range[5,1] | C[4,3,2] > O[4,3,2] | Lowest L[4,3,2] > C[1] | Highest
H[4,3,2] < O[5] | C[5,1] < O[5,1]

Interpretation: three short up bars that are sandwiched within the


range of two long down bars. Despite some buying pressure, sellers
stayed in control of the market.

Upside Gap with Two Crows #18


# of Bars: 3

Logic: range[3,1] > ATR(22)[4] | body[3,1] > 75% range[3,1] | C[3] > O[3]
C[1] < O[1] | C[2] > O[2] | O[2] > C[3] | O[1] > C[2] | C[1] < L[2] | C[1] >
O[3]

Interpretation: a gap in an uptrend with an engulfing bar usually


indicates a corrective reversal within an uptrend.

[Link] 19
The Ultimate Guide to Candlestick Patterns

Bearish Sandwich #20


# of Bars: 3

Logic: range[3,2,1] > ATR(22)[4] | C[3] > O[3] | C[1] > O[1] | C[2] < O[2]
| body[3,2,1] > 75% range[3,2,1] | C[3] = C[1] = O[2] +/- 10% ATR(20)

Interpretation: a support level is created when three long bars have


closely equal Close/Open in a downtrend.

[Link] 20
The Ultimate Guide to Candlestick Patterns

What are Inconclusive Patterns?


Figure (6) shows candlesticks that are considered as indecision
patterns. Again, you might find different names and different
interpretations of these patterns, also there might be very close
derivatives of them.

[Link] 21
The Ultimate Guide to Candlestick Patterns

Spinning Top #21


# of Bars: 1

Logic: body < 25% range |

If C[1] > O[1] then O[1] > (L[1] + 30% body[1]) | C[1] < (L[1] + 60%
body[1]) |

If C[1] < O[1] then C[1] > (L[1] + 30% body[1]) | O[1] < (L[1] + 60%
body[1]) |

Interpretation: this candlestick often found within an uptrend,


downtrend or consolidation and signifies a possible reversal.

Doji #22
# of Bars: 1

Logic: range[1] < 40% ATR(22)[2] | C[1] = O[1]

Interpretation: a doji pattern is often found at the top or bottom of


trends. It is a sign of possible reversal.

Dragonfly Doji #23


# of Bars: 1

Logic: range[1] >= ATR(22)[2] | C[1] = O[1] = H[1] (within top 5% of bar)

Interpretation: this pattern indicate complete change of sentiment


during the day, where the price went significantly down but reversed
and closed where it opened.

[Link] 22
The Ultimate Guide to Candlestick Patterns

Gravestone Doji #24


# of Bars: 1

Logic: range[1] >= ATR(22)[2] | C[1] = O[1] = L[1] (within bottom 5% of


bar)

Interpretation: this pattern indicate complete change of sentiment


during the day, where the price went significantly up but reversed and
closed where it opened.

[Link] 23
The Ultimate Guide to Candlestick Patterns

What filters will determine a true signal?


Most, if not all patterns needs to happen at a convergence point. The
simplest are after an uptrend/downtrend, at a support/resistance level,
or after increased/decreased volatility, etc.

We will use the following convergences:

Simple UpTrend
# of Bars: 22

Logic: C[1] > Highest H(22)[2]

Interpretation: this is a very loose definition of a trend. close of two


bars ago made a new 22 days high, which means we were in an
uptrend.

Simple DownTrend
# of Bars: 22

Logic: C[1] < Lowest L(22)[2]

Interpretation: this is a very loose definition of a trend. close of two


bars ago made a new 22 days low, which means we were in an
downtrend.

[Link] 24
The Ultimate Guide to Candlestick Patterns

While the above is a valid short term trend definition, there are many
ways to define a trend. Each variation has its merits, and to make a
block for every variation is not a practical way, at least for this ebook.
Instead I picked a couple of simple ideas to implement but of course
you are free to build your own favorite blocks for trend definition.

Figure (7) below shows a short term uptrend/downtrend:

[Link] 25
The Ultimate Guide to Candlestick Patterns

Short-Term UpTrend #25


# of Bars: 6

Logic: range[1] >= ATR(22)[2] | body[1] > 75% range[1] | C[1] > O[1] |
(C[1] – Lowest L[6,5,4,3,2]) > 2 ATR(22)[2]

Interpretation: this is more precise way of measuring short term


trend. price have been in uptrend for past 6 bars, and advanced more
than twice ATR(22).

Short-Term DownTrend #26


# of Bars: 6

Logic: range[1] >= ATR(22)[2] | body[1] > 75% range[1] | C[1] < O[1]
(Highest H[6,5,4,3,2] – C[1]) > 2 ATR(22)[2]

Interpretation: this is more precise way of measuring short term


trend. price have been in downtrend for past 6 bars, and declined more
than twice ATR(22).

[Link] 26
The Ultimate Guide to Candlestick Patterns

Figure (8) below shows support and resistance around a


moving average:

Moving Average #27


# of Bars: 50

Logic: C[1] > (SMA(50)[1] - 1%) AND C[1] < (SMA(50)[1] + 1%)

Interpretation: most times the moving average acts as a


support/resistance to the price. When Close is within 1% of the moving
average then we will consider the pattern. Any lookback period can be
used.

[Link] 27
The Ultimate Guide to Candlestick Patterns

Several other technical indicators can be used, but I will leave this up to
you. For example, you can use Bollinger bands as the filter. Only when
price go above/below Bollinger bands then check for patterns, or only
when RSI above 70 check for pattern, etc.

Other ideas to test includes (but not limited to):

 Keltner channel
 Bollinger Bands
 RSI
 ConnorsRSI
 Increasing / Decreasing Volatility
 Stochastic
 Rate of Change
 Momentum
 Double MA
 Triple MA
 EMA

and change to a different lookback/variable in each of the above


suggestions. So you see there are unlimited ways to filter for these
patterns and that’s where the power of Strategy Quant X comes into
play, where you can just pick blocks and randomly or deliberately
combine it with technical indicators to build thousands of iterations,
while you sit back and drink your coffee.

[Link] 28
The Ultimate Guide to Candlestick Patterns

How to import Custom Blocks into SQX?


Ok, now the description is out of the way, let’s get to testing them. First
go to [Link]
and enter your email. After submitting your email, you will receive a
message with the link to download this document along with two
databases that contain all the custom blocks (26 blocks) and three
group of blocks.

Unzip the downloaded file to a folder on your computer.

Open Strategy Quant X

[Link] 29
The Ultimate Guide to Candlestick Patterns

and go to Algo Wizard

Click on customize

[Link] 30
The Ultimate Guide to Candlestick Patterns

Then click on Custom Blocks then click on Import

Chose the file to import:


“StatOasis SQX Custom Blocks - Candlestick Patterns v8.2 with [Link]”

[Link] 31
The Ultimate Guide to Candlestick Patterns

Then click on Random Groups Tab and click on import

Chose the file to import:


“StatOasis SQX Group Blocks - Candlestick Patterns [Link]”

That’s it, all custom blocks should show up inisde Builder/Building Blocks/Custom
Blocks.

[Link] 32
The Ultimate Guide to Candlestick Patterns

THANK YOU SO MUCH!


I hope you enjoyed this freebie. The current version of SQX 128.182 is a
little buggy with AlgoWizard, many crashes and UI reloads. It took me
many hours (20+) just to write the code for the custom blocks and
many more hours to do the video and the ebook.

If you got some use of it, then please subscribe and hit the like button.

Great more content are coming your way.

▹Download SQX Custom Blocks code and this eBook |


[Link]

▹Subscribe to my YouTube channel | [Link]

▹Check out my website | [Link]

▹Read my blog | [Link]

▹Twitter | [Link]

▹Instagram | [Link]

▹Business Enquiries | info@[Link]

Join Algo Trading Master Class | [Link]


trading-masterclass

[Link] 33

The Ultimate Guide to Candlestick Patterns 
www.StatOasis.com 
1 
THE ULTIMATE GUIDE TO 
CANDLESTICK PATTERNS 
More than 26 C
The Ultimate Guide to Candlestick Patterns 
 
 
www.StatOasis.com 
2 
 
Hello, my name is A. Casey 
I am an algorithmic trade
The Ultimate Guide to Candlestick Patterns 
 
 
www.StatOasis.com 
3 
what’s available in the current market in this niche, a
The Ultimate Guide to Candlestick Patterns 
 
 
www.StatOasis.com 
4 
Contents 
About me   ----------------------------------
The Ultimate Guide to Candlestick Patterns 
 
 
www.StatOasis.com 
5 
Bearish Marubozu [12]  --------------------------------
The Ultimate Guide to Candlestick Patterns 
 
 
www.StatOasis.com 
6 
Introduction 
Candlestick charts originated in Japan in
The Ultimate Guide to Candlestick Patterns 
 
 
www.StatOasis.com 
7 
What is a Candle Stick? 
It is a visual way to represen
The Ultimate Guide to Candlestick Patterns 
 
 
www.StatOasis.com 
8 
is always higher than bar low. Some charts represent an
The Ultimate Guide to Candlestick Patterns 
 
 
www.StatOasis.com 
9 
What are Bullish Patterns? 
Below figure (2) shows cand
The Ultimate Guide to Candlestick Patterns 
 
 
www.StatOasis.com 
10 
Hammer #1 
# of Bars: 1 
Logic: body[1] < 20% of range

You might also like