Sei sulla pagina 1di 15

"Birth of a Candlestick - Using Genetic Algorithm to Identify Useful Candlestick Reversal Patterns" by Jonathan

T. Lin, CMT
Article taken from the Summer 2000 issue of the MTA Journal of Technical Analysis
INTRODUCTION
Basics of Candlestick Charting Techniques
Candlestick charts are the most popular and the oldest form of technical analysis in Japan, dating back almost 300 years.
They are constructed very much like the Open-High-Low-Close bar charts that most of us use everyday, but with one
difference. A real body, a box instead of a line as in a bar chart, is drawn between the opening and closing prices. The
box is colored black when the closing price is lower than the opening price and colored white if the close is higher than the
open. With the colors of the real bodies adding a new dimension to the charts, one can spot the changes in market
sentiments at a glance - bullish when the bodies are white, and bearish when black. The lines extending to the high and to
the low remain intact. The part of the line between the real body and the high is called the upper shadow, while the part
between the real body and the low is termed the lower shadow.

The strength of candlestick charting comes from the fact that it adds an array of patterns to the technical toolbox,
without taking anything away. Chart readers can draw trendlines, apply computer indicators, and find formations such as
ascending triangles and head-and-shoulders on candlestick charts as easily as they can on bar charts. Let us now examine
some candlestick patterns, their implications, and the rationale behind them.
A bearish engulfing pattern is formed when a black real body engulfs the prior days white real body. As the name implies,
it is a signal for a top reversal of the proceeding uptrend. The rationale behind a bearish engulfing pattern is
straightforward. A white candlestick is normal within an uptrend as the bulls continue to enjoy their success. An engulfing
black candlestick the next day would mean that the open price of the next day is higher than the close of the first day,
signaling possible continuation of the rally. However, the bulls of the first day turn into losers as the price closes lower
than the first days open. Such a shift in sentiment should be alarming to the bulls and signals a possible top.
A morning star is comprised of three candles: a long black candlestick, followed by a small real body that gaps under that
black candlestick, followed by a long white real body. The first black candlestick is normal within a downtrend. The
subsequent small real body, whose close is not far off the open, is the first warning sign as the bears were not able to move
the price much lower as they did the first day. The third day marks a comeback by the bulls, completing the morning
star, a bottom reversal pattern.

There is really no need for me to cover too many candlestick patterns here. The examples are given merely to illustrate the
fact that most candlestick patterns are nothing more than collections of up to three sets of openhigh-low-close prices and
their relative positions to the others.
Importance of Size and Locations of Candle Patterns
The other important points to keep in mind are the sizes of the candlesticks in the patterns and the locations of the
patterns within recent trading range of the price. Let us consider a stock that trades around $60. Scenario One: On the
first day, it opened at $60 and closed at $63.75. On the next day, it opened at $64 and closed at $58.75. Those two days
trading constitutes a bearish engulfing pattern. This pattern should be considered meaningful since a roughly $4 run-up
followed by a $5+ pullback is of considerable impact on a $60 stock. Scenario Two: The same stock opened at $60 and
closed at $61 on the first day, and opened at $61.25 and closed at $59.875 the next day. Those two days trading did indeed
still constitute a bearish engulfing pattern, but the effect of the pattern would not be considered as meaningful. A $1
fluctuation for a $60 stock is pretty much a non-event. It should be evident that the sizes of the candlesticks within a
pattern do matter as much as the pattern itself.
We should now look at the importance of the location of the pattern relative to its trading range. Let us assume that the
aforementioned $60 stock has been trading between $45 and $55 for five months, broke out to new high, and ended the
last two trending days as described in Scenario One, one could speculate that support at $55 probably will be tested in the
near future. If the stock, however, has been trading between $58 and $64 for five months, tested the support at $58,
rallied up to $63.75, just slipped back to $59.875, the bearish engulfing pattern described in Scenario One should have
little meaning. The validity of this pattern is limited here since there was not much of a uptrend proceeding the pattern
and the downside risk to $58 is only $1.875 away.
From these comparisons, it should be obvious that the usefulness of candlestick patterns rely on: 1) The size of the
candlestick components real bodies, upper and lower shadows; 2) The relative positions among themselves gapping
from one another, overlapping. After all, that is how patterns are defined; and 3) The patterns locations relative to the
previous periods trading range and 4) The size of the trading range itself. In order to find an effective candlestick pattern,
these points should all be considered integral parts of the pattern definition.
[Authors Note: Although volume and open interest accompanying the candlestick patterns could be used as confirmation,
the author has decided not to include either as part of the pattern definition for two reasons: 1) A stock can rally or decline
without increasing volume. Volume tends to be more evident around structural breakouts and breakdowns, but not always
so around early reversal points. This is especially true for thinlytraded stocks where the price can move either way quickly
without much volume. Depending on volume as confirmation is impractical at times. 2) The pattern the author plans to
find should be rather universal just like the other candlestick patterns. Shooting stars are not unique to crude oil futures;
nor is the bearish engulfing pattern only designed for Microsoft stock. Since some market data, such as spot currencies
and interest rates, do not contain volume nor open interest information, a candlestick pattern with volume or open
interest as an integral part of it will not be universally useful.]
Basics of Genetic Algorithm Survival of the Fittest

Survival of the Fittest. Darwins theory of evolution remains one of the scientific theories that has had the most profound
impact on humankind to date. In his theory, Darwin proposed that species evolve through natural selection, that is,
species chance of existence and their ability to procreate depend on their ability to adapt to their natural habitat. Since
only the organisms fit for their natural environment survive, only the genes they carry survive. During the reproductive
process, the next generation of organisms are created from the genes drawn from the surviving, and hopefully superior,
gene pool. The new generation of organisms should, in theory, be even more adaptive to their environment. As some of the
offspring produced will certainly be more adaptive to the environment than their peers and therefore survive, the natural
selection process repeats itself, and again only superior genes will be left in the gene pool. As the process is repeated
generations after generations, nature will preserve only the fittest genes and dispose of the inferior ones. It should be
noted that during the process, the genes sometimes will experience certain degrees of mutation that might create
combinations of genes never seen in previous generations. Mutation actually brings about a more diversified pool of
genes, perhaps creating even more adaptive organisms than otherwise possible. At times in nature, an array of species
evolve from the same origin, with each of them as fit for its habitat as the others in its own right.
So, what is genetic algorithm? In plain English, genetic algorithm is a computer programs way of finding solutions to a
problem by the process of eliminating poor ones and improving on the better ones, mimicking what nature does. In
constructing a genetic algorithm, one would start out by defining the problem to be solved in order to decide on the
evaluation procedure, imitating the process of natural selection. Tr y a few possible solutions to a problem. Rank them
based on their performance after applying the evaluation process. Keep only the top few solutions and let them reproduce,
or mix elements of the top solutions to come up with new ones. The new solutions are then, in turn, evaluated. After a few
iterations, or generations, the best solutions will prevail
For a better explanation, we should now try a fun, practical exercise. Let us consider the process of finding that perfect
recipe for a margarita. We start out with six randomly mixed glasses; record the proportion between tequila and the lime
juice and taste them. The evaluation process here is your friends reactions. They agreed that two glasses were found okay,
three of them so-so, and one which yielded the response, My dog is a better bartender than you. You then mix five more
glasses using proportions somewhere between those found in two okay glasses, and throw in one wildcard, a randomly
mixed sample. Now let them try picking the two best ones again. After you get your friends stone-drunk after repeating
this process 20 times, you will have yourself two nice glasses of margarita. Most importantly, those two glasses should be
of similar proportion of lime juice and tequila; that is, the solution to this problem converged.
Let us now review our margarita experiment. The goal was to find the best tasting margaritas, and therefore the way to
evaluate them was to taste them and rate them. Assuming that you have an objective way to total your friends opinions of
the samples, the ones that survived by this somewhat natural selection the okay glasses will get to reproduce. The
wildcard thrown in represents the mutated one. Just like mutations importance in nature as a way of injecting new genes
into the gene pool and bringing about a more diverse array of species, artificial mutations are very important in opening
up more possibilities in the range of solutions for the problem we intend to solve.
In a more involved problem with more variables, the procedure should be repeated many more than 20 times for any halfway decent solutions to prevail. The more iterations the program perform, the more optimal the solution should be. In
fact, if the surviving solutions do not resemble each other at all, they are probably far from optimal and require more time
to evolve. What we are searching for here are sharks. Sharks, one of the fastest species in water, have been swimming in
the ocean for millions of years. For generations, the faster ones survived by getting to their food faster in a feeding frenzy.
Only the fast genes are left after all these years. As sharks efficient hydrodynamic lines became perfect, all of them
started to look alike. (At least to most of us.)
End Note: To explain the concept of genetic algorithm in an academic manner, I will turn to the principles set forth by
John Holland, who pioneered genetic algorithms in 1975:
1.
2.

Evolution operates on encodings of biological entities, rather than on the entities themselves.
Nature tends to make more descendants of chromosomes that are more fit.

3.

Variation is introduced when reproduction occurs.

4.

Nature has no memory. [Author: Evolution has no intelligence built in. Nature does not learn from previous
results and failures; it just selects and reproduces.]
Now the steps of the algorithm:

1.

Reproduction occurs.

2.

Possible modification of children occurs.

3.

The children undergo evaluation by the user-supplied evaluation function.

4.

Room is made for the children by discarding members of the population of chromosomes. (Most likely the
weakest population members.)
Definition of the Projects Intent: Applying Genetic Algorithm to Identify Useful Candlestick Reversal Patterns
Let me now define the problem I intend to solve in this study. I intend to find one candlestick pattern that has good
predictability in spotting near-term gains in future price by using the bond futures contract as my testing environment.
Since I have cited sharks as the marvelous products of natural selection, I would like to call the organisms that should
evolve through my study candlesharks.
The candlesharks will have genes that tell them when to signal potential gains, or eat if one would parallel them to the
real sharks. The first generation candlesharks should be pretty dumb and not really know when or when not to eat
maybe some are eating all the time while some simply do not move at all. As some of them over ate or starved to death, the
smarter ones knew how to eat right, correctly spotting potential for profit. As only the smart ones survive, they begin to
preserve only the smart genes. As these smarter ones mate and reproduce, some of the next generation may contain, by
chance, some even better combination of genes, resulting in even smarter candlesharks. As the process continues, the
candlesharks should evolve to be pretty smart eaters. Once in a while, some genes will mutate, creating candlesharks
unlike their parents. Whether the newly injected genes will be included in the gene pool will depend on the success of
these mutated creatures in adapting to their environment.
One thing that should be pointed out is that the late generation candlesharks will probably swim better in bond futures
pool better than in a spot gold pool or equity market pool which they have never been in before. Survival of the
fittest is more like survival of the curve-fittest here. It should be understood that the candlestick pattern found here has
evolved within the bond environment and thus is best-fit for it. If thrown into the spot gold pool, these candlesharks
might die like the dinosaurs did when the cold wind blew as the Ice Age hit them so unexpectedly, as one of the many
theories goes. As in many cases in life, the finer a design with one purpose in mind, whether natural or artificial, the less
adaptive it will be when used for other purposes. For example, a 16-gauge wire stripper, while great with 16-gauge wires,
will probably do a lousy job stripping 12-gauge wires even when compared to a basic pair of scissors, which can strip any
wire though slowly.
BUILDING A SUITABLE ENVIRONMENT FOR EVOLUTION
Defining the Genes
As described in the previous sections, there are, but not limited to, four major deciding factors of the significance of an
occurrence of a particular candlestick pattern. They include the size of the recent trading range, current position within
that range, relative position of the candlesticks to each other, and the sizes of the those candlesticks. To successfully sur
vive in the bond futures pool, it must be in the genes of the candlesharks to be able to distinguish variations in these
environmental parameters. I have therefore designed a candleshark to possess the listed genes in Exhibit 1. Genes within
Chromosome C-2, for example, tells the candleshark the range of position and size of the candlestick of two days ago
should be within, combined with other chromosomes parameters, before giving a bullish signal. Actually, think of all
these genes as simply tandem series of on-off switches for a candleshark to decide to give a bullish signal or not.
All the genes defined here come in pairs. The first, with suffix -m, tells the candleshark the minimum of the range in
question. The second, with suffix +, signifies the width of the range. Here is one example. If RB-m of C2 is -24 and RB+
of C2 is 16, the candleshark will only give a bullish signal when the candlestick of two trading days ago has a black real
body sized between 8 (-24 + 16 = -8) ticks and 24 ticks, or the contract closed between _ to _ lower than it opened. Please
keep in mind that C2 only contributes to a part of the decision-making process for the candleshark. Even if the real body of
two days ago fits the criteria, the other criteria have to be met as well before the candleshark will actually give a bullish
signal.
The number of digits needed within each gene can be calculated. The size of a real body for a bond contract can not be
larger than 96 ticks since the daily trading limit is set to three points. A seven-bit binary number is capable of handing
numbers up to 128 and therefore needed for a gene like RB-m of C2. The 40-day trading could be no larger than 96 ticks
times 40, or 3840 ticks. (Besides the fact that it seems very unlikely that the bond contract would go up, or down, 3 points
day after day for 40 days.) A 12-bit number, capable of handing a decimal number up to 4096 is needed here.

As the reader might have noticed after referencing Exhibit 1, a number of trading ranges are used. As previously
mentioned, the size of the recent trading range and the candle patterns position within the range are crucial elements that
might make or break the pattern. How does one define recent though? It then seemed obvious to me that a multitude of
day ranges is needed here, much like the popular practice of using a number of moving averages to access the
crosscurrents of shorter and longer-term trends. I have chosen to include 5-day, 10-day, 20-day and 40-day trading
ranges, which are more or less one, two, four, and eight trading weeks, in my study. The advantage of using a multitude of
day ranges could be demonstrated using two examples. Let us say a morning star, a bullish candlestick reversal pattern,
was found near when the price is at the bottom of both the five-day trading range and the 40-day trading range, as it
would if it was just making a new reaction low. A morning star around this level is probably less useful since that pattern is
more indicative of a short-term bounce. While this morning star, a one-day pattern, could be signaling a possible turn of
the trend of the last five days, it is unconvincing that this one-day pattern could signal an end to the trend that lasted at
least 40 days.
Let us now say that the same morning star was found near the bottom of the five-day trading range, but near the top of the
40-day trading range, as the price of a stock would if it experienced a short- term pullback after breaking out of a longerterm trading range. This morning star now could be a signal for the investor to go long the stock. The morning stars in
both examples could be of the same size, both found near the bottom of the five-day trading range, but would have
significantly different implications just because they appear at the different points of the 40-day trading range. It should
be clear now that the inclusion of multiple trading ranges in the decision-making process could be very beneficial.
Since each gene is a binary number, a string of 0s and 1s, each will have a MSB (most significant bit, the leftmost digit,
like 3 in 39854) and LSB (least significant bit, the rightmost digit.) Since the MSB obviously has more impact on the
candlesharks behavior, the common state of the more significant bits among the candlesharks are what we should closely
examine after the program has let the candlesharks breed for a while. The candlesharks main features should be similar
after a while. That is, if we do have a nice batch of candlesharks to harvest, they should all have the same sets of 0s and 1s
among the more significant bits within each gene. The 0s and 1s among the trailing bits are less significant by
comparison, much like the curvature of an athletes forehead should have less to do with his speed than his torso
structure. The trailing bits are in the genes and do make a difference, but are basically not significant enough for us to
worry about.
When we are ready to harvest our candleshark catches as the performance improvement from one generation to the next
decreased to a very small level, we could reverse-engineer the gene to find the criteria that trigger their bullish signals. For
instance, if all eight candlesharks have -00011 as the first five digits in RB-m of C2 (that means RB-m is between
-00011000 and -00011111, or - and -31) and 00000 as the first five digits of RB+ of C2 (that means RB+ is between
0000000 and 0000011, or 0 and 3), these candlesharks would only give bullish signals when the real body of two days ago
is black, and between size of -21 and -31. (The minimum = -31 + 0 = -31; the maximum = -24 + 3 = -21)
Defining the Evaluation Process
I have weighed several methods to evaluate the performance of each of the organisms. First of all, a suitable method has to
be of short-term nature since the pattern in question is basically formed in three days. It is very unlikely that, for instance,
a morning star formed in three days that occurred twenty days ago has much influence on current price. Secondly, the
upward price movement that comes after the pattern has to be greater than the downward movement, at least on the
average. It should be realized that no matter how useful a candlestick pattern, or any technical tool, may be, there will be a
time that it would not have predictive ability, or even give a downright wrong signal. It then seems reasonable that
including total downward moves is essential in the evaluation process. That is, we would like to find a pattern that is not
only right and right enough most of the time, but one that will not take anyone to the cleaners when it is wrong.
What I have decided on is the average of the maximum potential gain less the maximum potential loss. First, we find the
maximum potential gain by totaling all the differences between the highest of the high prices reached by the contract
within the next five trading days from the closing price when the pattern gave the signal. We then find the maximum
potential loss by totaling all the differences between the lowest of the low prices reached by the contract within the next
five trading days from the closing price when the pattern gave the signal. The maximum loss is subtracted from the
maximum gain, and is then divided by the number of signals generated. This ratio is the average of the maximum
potential gain less the maximum potential loss I am looking for.

Defining the Reproductive Process


We desire enough permutations of the parents genes to create diversity among the offspring. Yet, too many offspring in
each generation would greatly increase the processing time needed to evaluate the performance of all the offspring. After a

fair amount of contemplating, I believe that eight offspring from two parents is adequate. A trial run shows that the
evaluation of eight organisms with 1,500 days worth of data requires roughly four minutes of processing time on my
personal computer. That equals 1,080 generations after three straight days of processing. Since a large number of
generations might be required for the effective evolution, eight organisms per generation would have to do. Besides,
allowing only two out of eight offspring to sur vive is a stringent enough elimination process. Many large mammals have
fewer offspring in their life times.
The second crucial element of the reproduction is the introduction of mutation. Under the principles set forth by John
Holland, mutations come in two modes: binary mutation, the replacement of bits on a chromosome with randomly
generated bits, and one-point crossover, the swapping of genetic material on the children at a randomly selected point. I
have favored a higher level of mutation since it would introduce more diverse gene sequences into the gene pool more
quickly. Both the binary mutation level and one-point crossover level have been set to 0.1, or 10% of the time.
EVALUATION OF RESULTS
Preliminary Results and Modifications
As some people might have suspected, what I thought was a wonderful study had a pretty rocky start. The final version of
the gene definition, as the readers know it, is actually the third revision. A large number of genes slows down the
processing time dramatically. Having too many trading ranges defined also proved to be a waste of time.
Choosing the right gene pool to start with, much to my surprise, was in fact quite tricky. I first wrote a small routine using
the Visual Basic Macro in Excel to randomly generate eight candlesharks. These candlesharks did indeed reproduce and
the evolution program, also written in Visual Basic, performed its duty and evaluated each one of them. After testing the
programs and becoming convinced of their ability to perform their functions, I let the program run overnight, evolving 50
generations. What I found the next morning were eight candlesharks that did absolutely nothing. None of them gave any
signal. As they all performed equally poorly, the two selected to reproduce were basically chosen arbitrarily. What I had
come up with were the equivalents of the species that would have been extinct in nature.
The next logical step then was to use two organisms that would give me signals all the time and to write a small routine to
generate six offspring from them. The eight of them would then be my starting point. This proved to be much more
effective. Since the first batch of candlesharks did indeed provide me more signals than I needed, their offspring could
only give an equal amount or less signals. As some of the children became more selective, their performance did improve.
After viewing the printed results of the first seven or so generations, I was glad to see the gradual, yet steady improvement
in the ability to find bullish patterns. I again let them grow overnight.
What I found the next morning was a collection of candlesharks that gave either one or two signals. Each of the signals
was wonderful, pointing to large gains without much risk. As it turned out, a few of them were simply pointing to the same
date. These candlesharks basically curve-fitted themselves just to pick up the day followed by the best five-day gain in the
data series. They were again useless.
It then occurred to me that I had to set a minimum number of signals per organism that the candlesharks would have to
meet before the program would consider evaluating them as the breeding ones. Since I was using 1,500 days, or roughly
six years, worth of data, the minimum of 20 signals, or a little over three a year, should suffice.
I am glad to report that things started to look up afterward. I have also decided that running the program with smaller
iteration could be beneficial. I began running only five generations each time so that I could observe the progress and
make any necessary adjustment. It was not until that most things had been fine-tuned that I began my overnight numbercrunching again.
Finding Useful Gene Sequences
I first wrote the program with the intention to let the candlesharks evolve and hoped to see them converge into a batch of
similarlyshaped creatures. In other words, I was looking for a group of consistent performers. It so happened that in the
evolution program, I had coded a line to print out the gene pool with the evaluation results after every generation. This
feature was first put in place as a way to monitor the time needed for each generation, A Wonderful Example Small
Overlap of the First Two Candles and to ensure that the reproduction process was performed correctly. As it turned out,
this feature had an extra benefit.
Looking through pages and pages of printouts, I every so often spotted one candleshark with excellent performance. Since
a genetic algorithm is based on the principle that nature has no memory, this candlesharks excellent gene sequence could

not be preserved. The only traces of the sequence is in its children which might not be as good a predictor as it was. This
does occur in nature as well. Einsteins being an incredible physicist did not imply that his children would have been, too.
Even if some of his genes would live on within his children, none might be as great as he was. A number of Johann
Sebastian Bachs sons were outstanding composers, but none as great as he was.
With the printouts in my hands, though, I could reconstruct that one unique gene sequence. I could examine the organism
by itself and let it reproduce several times to see if it could be improved upon. Better yet, I could find two great performing
candlesharks who did not have to be of the same generation, and let them mate, something impossible in nature. Imagine
the possibility of seeing the children of J.S. Bach and Clara Schumann if they were ever married, or turning Da Vinci into a
female to mate with Picasso. One might hesitate doing so in nature, but I face no moral dilemma moving a few 0s and 1s
all over the place.
Evaluating Gene Sequences for Useful Patterns
Running the program from different starting points yielded varying results. One of the runs that intrigued me the most
was one that ended with at least five or six organisms out of the last three generations with similar if not identical
performance numbers. Upon more careful inspection of the signals they generated and referencing candlestick charts for
the bond futures contract, one pattern seemed prominent. (For a sample of the signal results, see Exhibit 6.) The first day
of the pattern shows a large black candlestick, usually with modestly sized upper and lower shadows. The second candle
Candlestick Examples
The following charts are examples of a candlestick chart.

The first major marker of a candle is seen just prior to the 8th with a bullish engulfing candle.
We see confirmation of the bullish behavior leaving a rising window (gap higher) on the chart.
Next we see a doji candle which tells us that the market is in transition and is in danger of changing directions. (in this
case from up to down)
This is followed by a closing window (a gap lower).
This formation is called, by western analysis, an island.
We then see consolidation on the chart leading to a rally.
We have an evening star, which is a three-candle pattern. This is a sell-signal and is seen at the top of the move. We see an
aggressive rally leading to a doji like candle with a very small body. The body of that doji does not touch the previous
candles body nor does it touch the following candles body. The next candle shows a closing window and a bearish decline
in the market.
---The following image shows a double bottom and double top on the same chart.

The Pin Bar: A Powerful Price Action Reversal Pattern


The process of trading is quite simple if you boil it down to its most basic element. Essentially, trading involves buying a
security at a specific price and then selling that security at a higher price, or selling a security at a specific price and then
buying it back at a lower price. In order to do this, traders employ endless types of technical and fundamental analysis in
an attempt to identify market momentum and price direction. A major question in the mind of every trader is where is
price headed?
Now, we know that technical analysis primarily involves the analysis of historical price data, and historical results are not
necessarily indicative of future results. The pin bar, however, is a powerful price action setup that tells a fascinating story
concerning price momentum and the possibility of an imminent reversal in price direction.
The Pin Bar

A pin bar is a Japanese candlestick that has a long wick on one side and a small body. Japanese candlesticks were formed
by a Japanese rice trader named Munehisa Homma during the 17 century. Munehisa believed that human psychology was
driving the market, and he wanted to graphically represent this. The result was the formation of the Japanese
candlestick. Japanese candlesticks offer traders a powerful glimpse into the current market psychology that is driving
price, and the pin bar is no different.
Underlying Psychology of the Pin Bar
Understanding the story behind the pin bar is essential. Lets use the candlestick pictured above. When the period
opened, buyers took immediate control of the market and pushed price up aggressively. As price reached the top of the
wick, sellers were able to come into the market with sufficient supply as to hold off higher prices. Furthermore, not only
were sellers able to bring resistance into the market, but they actually took complete control of price, and a market
reversal occurred. Sellers began putting immense pressure on price, and price fell all the way back down to the periods
open, which is why we have a very long wick. Then, sellers actually pushed price back down below the periods open,
which is even further confirmation that they are now in complete control of the market.
The Pin Bar is a powerful signal of price reversal in a currency trading strategy. It denotes that there has been a strong
loss of upward momentum, and a possible reversal to the downside is now in play.
Not All Pin Bars Are Created Equal
The best pin bars are bearish pin bars that form at the top of an extended move up, and bullish pin bars that form at the
bottom of an extended move down.

The two pics above show pin bars at the top and bottom of extended moves. These are the ones you want to play. Stay
away from pin bars that form in the middle of consolidation.
Timeframes
Price patterns that occur on higher timeframes tend to be more reliable than patterns that occur on lower timeframes
because patterns on a higher timeframe encompass a wider set of data; the pin bar is no different. Pin bars that form on
the Daily, 4 Hour, or 1 Hour charts tend to be much more reliable than pin bars that form on the 15 minute, 5 minute or 1
minute charts.
Confluence
The best pin bars are those that form at areas of technical confluence. For example, if several other technical tools such as
Fibonacci, Pivot Points, Moving Averages, etc. tell you that a certain price level could offer a strong reversal, and then a
pin bar forms, that is the ultimate confirmation.
Entry & Exit
Entry and exit is very simple. If you are going short on a bearish pin bar, enter short when the next candle opens and ticks
below the low of the bearish pin bar. If you are going long at your fx broker, enter long when the next candle opens and
ticks above the high of the bullish pin bar.

Keep in mind that these are general trading concepts that build on the collective experience of traders. Even though a lot
of traders believe that these chart patterns have a bearing on the future direction of the price there are no guarantees in
trading. Forex trading is risky and you should never speculate with funds you cannot afford to lose.
Cycle
Definition: A cycle is a rhythmic fluctuation that repeats over time with reasonable regularity. When it is sufficiently
regular and persists over a long enough span of time, it cannot reasonably be the result of chance. And the longer a nonchance rhythm continues, the more predictable it becomes.
Source: http://foundationforthestudyofcycles.org/
Accuracy: Just because the analysis of financial time series data may suggest cycles exist does not imply that the cycles
are precise. As mentioned earlier, all three aspects of a wave vary over time, and as wave is added to wave, the errors
become large. Because market cycles tend to synchronize at lows, the estimate of the phase is relatively easy. The analysis
just begins at a major price low where presumably most cycle lows coincide. The estimate of amplitude varies too much for
projection purposes. Amplitude is often called the "power" of the cycle in electronic analysis circles, where it tends to be a
constant in those applications. In the financial world, power can be influenced greatly by exogenous, unpredictable events.
The study of amplitude becomes non-productive. The third aspect of the cosine wave, the period, often remains relatively
constant but can sometime have a large error factor. It is an estimate based on immediate past price history. As an
example, a 20-day cycle low can occur several days before or after the expected 20 days from the last low, which itself may
have been several days before or after its ideal location. The 20-day cycle, from spectral or other analysis, may only be 19.2
days, or it may be 20.4 days. Cycle periods therefore are indefinite and have error. This means that for investment
purposes, all cycles should be used only as a guide. Even the seasonal cycle, which is well established, has actual high and
low dates that vary considerably from year to year.
Source: Kirkpatrick, Charles and Dahlquist, Julie. Technical Analysis: The Complete resource for Financial Market
Technicians; (c) 2007.
Harmonics: One of the interesting aspects of cycles first observed by Hurst in market data is that cycles tend to have
period lengths a multiple of two or three longer or shorter than the next series of cycles. In other words, a cycle of 20 days
will indicate that another longer cycle of either 40- or 60-days length exists and that another shorter cycle of 7 or 10 days
exists. The longer is either two times or three times the observed cycle, and the shorter is either 1/3 or 1/2 the observed
cycle. This observation is useful when one specific cycle is determined because it leads the analyst to what intervals to look
for in longer and shorter cycles. Hurst believes that the ratio of two is more common. Others, such as Tony Plummer
(2003), have hypothesized that three is the correct multiple.
Source: Kirkpatrick, Charles and Dahlquist, Julie. Technical Analysis: The Complete resource for Financial Market
Technicians; (c) 2007.
Inversions: One of the most difficult observations for the analyst to face is the inversion. Occasionally, where a cycle low
is expected, a peak occurs instead. This is an example of an inversion. No satisfactory explanation has been given for its
existence, but several observations have been noted.
First, inversions most often occur at peaks in harmonic cycles when the next longer cycle is at a peak. This makes sense
only if the next higher order cycle is a multiple of two. For example, a cycle of 20 days should make a low every 20 days. If
the next higher order cycle is 40 days and synchronous with the 20-day cycle, a 40-day peak ideally should occur just as a
20-day cycle is making a low.
Second, the inverted cycle low often has just a small very short-term low within the peak of the higher order cycle. This
forms into an "M" where the small low between the two small peaks is the actual cycle low that is being overcome by the
longer cycle.
Third, inversions do not always occur at larger cycle peaks.
Previously we noted that cycles are not strict harmonics but specific time-separated events. The habit of producing lows at
constant intervals can be interspersed with highs at the same intervals because both are important market events. Thus, a
long string of events occurring at specific intervals that is primarily dominated by low event but interspersed with
occasional high events can look like a harmonic wave for the period that the lows are occurring. However, the progression
is only a time sequence of events. Analysts assume that the progression is a cycle and that the inversion is an anomaly in a

harmonic-type wave. this analysis method is used only because the inversion is rare and because the mathematics of
cyclical events is relatively simple.
Source: Kirkpatrick, Charles and Dahlquist, Julie. Technical Analysis: The Complete resource for Financial Market
Technicians; (c) 2007.
Translation: The reason that we study lows in cycle analysis is because longer and shorter cycles tend to synchronize at
lows. Peaks, on the other hand, almost never synchronize. Peaks, ideally should occur at the halfway period of the cycle. A
20-day cycle, for example, should have a peak ten days from its last low. this rarely occurs. Peaks can occur earlier or later
than the halfway point. Their location away from the center point is called translation. A right translation in a cycle is
when the peak is beyond the halfway point, and a left translation is when the cycle peak occurs before the halfway point.
Usually, the underlying trend from a longer cycle determines the amount of translation in the shorter cycle.
Translation is useful in checking where the overlying longer-term cycle trend direction is headed or if it is changing.
Source: Kirkpatrick, Charles and Dahlquist, Julie. Technical Analysis: The Complete resource for Financial Market
Technicians; (c) 2007.
Detrending: Because specific cycle behavior is highly dependent on the direction of the next higher order cycle, the first
step in recognizing if a cycle exists in the data is to "detrend" it. Detrending is done merely by dividing the current prices
by a moving average of those prices. The resulting plot will oscillate above and below a zero line, and the lows of the plot
will correspond to the lows in the cycle being analyzed.
When prices are detrended using the daily closing price as the numerator, especially as we lengthen the denominator, the
plot becomes very erratic and difficult to interpret. the solution is to use a moving average in the numerator as well, but
this presents some problems that must first be addressed.
Dow Theory: 6 Basic Tenets
1. The Averages Discount Everything: The idea that the markets reflect every possible knowable factor that affects
overall supply and demand is on the basic premises of technical theory. The theory applies to market averages, as well as it
does to individual markets, and even makes allowances for "acts of God." While the markets cannot anticipate events such
as earthquakes and various other natural calamities, they quickly discount such occurrences, and almost instantaneously
assimilate their affects into the price action.
2. The market Has Three Trends: Dow defined an uptrend as a situation in which each successive rally closes higher
than the previous rally high, and each successive rally low also closes higher than the previous rally low. In other words, an
uptrend has a pattern of rising peaks and troughs. The opposite situation, with successively lower peaks and troughs,
defines a downtrend. Dow's definition has withstood the test of time and still forms the cornerstone of trend analysis.
Dow believed in that the laws of action and reaction apply to the markets just as they do to the physical universe. He
wrote, "Records of trading show that in many cases when a stock reaches top it will have a moderate decline and then go
back again to near the highest figures. If after such a move, the price again recedes, it is liable to decline some distance"
(Nelson, page 43).
Dow considered a trend to have three parts, primary, secondary, and minor, which he compared to the tide, waves, and
ripples of the sea. The primary trend represents the tide, the secondary or intermediate trend represents the waves that
make up the tide, and the minor trends behave like ripples on the waves.
An observer can determine the direction of the tide by noting the highest point on the beach reached by successive waves.
If each successive wave reaches further inland than the preceding one, the tide is flowing in. When the high point of each
successive wave recedes, the tide has turned out and is ebbing. Unlike actual ocean tides, which last a matter of hours,
Dow conceived of market tides as lasting for more than a year, and possible for several years.
The secondary, or intermediate, trend represents corrections in the primary trend and usually lasts three weeks to three
months. These intermediate corrections generally retrace between one-third and two-thirds of the previous trend
movement and most frequently about half, or 50%, of the previous move.

According to Dow, the minor )or near term) trend usually lasts less than three weeks. This near term trend represents
fluctuations in the intermediate trend.
3. Major Trends Have Three Phases: Dow focused his attention on primary or major trends, which he felt usually
take place in three distinct phases: accumulation phase, a public participation phase, and a distribution phase. The
accumulation phase represents informed buying by the most astute investors. If the previous trend was down, then at this
point these astute investors recognize that the market has assimilated all the so-called "bad" news. The public
participation phase, where most technical trend-followers begin to participate, occurs when prices begin to advance
rapidly and business news improves. The distribution phase takes place when newspapers begin to print increasingly
bullish stories; when economic news is better than ever; and when speculative volume and public participation increase.
During the last phase the same informed investors who began to "accumulate" near the bear market bottom (when no one
else wanted to buy) begin to "distribute" before anyone else starts selling.
Students of Elliott Wave Theory will recognize this division of a major bull market into three distinct phases. R.N. Elliott
elaborated upon Rhea's work in Dow Theory, to recognize that a bull market has three major, upward movements.
4. The Averages Must Confirm Each Other: Dow, in referring to the Industrial and rail Averages, meant that no
important bull or bear market signal could take place unless both averages gave the same signal, thus confirming each
other. He felt that both averages must exceed a previous secondary peak to confirm the inception or continuation of a bull
market. He did not believe that the signals had to occur simultaneously, but recognized that a shorter length of time
between the two signals provided stronger confirmation. When the two averages diverged from one another, Dow
assumed that the prior trend was still maintained. (Elliott Wave Theory only requires that signals be generated in a single
average.)
5. Volume Must Confirm the Trend: Dow recognized volume as a secondary but important factor in confirming price
signals. Simply stated, volume should expand or increase in the direction of the major trend. In a major uptrend, volume
would then increase as price move higher, and diminish as prices fall. In a downtrend, volume should increase as prices
drop and diminish as they rally. Dow considered volume a secondary indicator. He based his actual buy and sell signals
entirely on closing prices. Today's sophisticated volume indicators help determine whether volume is increasing or falling
off. Savvy traders then compare this information to price action to see if the two are confirming each other.
6. A Trend Is Assumed to Be in Effect Until It Gives Definite Signals That It Has Reversed: This tenet forms
much of the foundation of modern trend-following approaches. It relates a physical law to market movement, which states
that an object in motion (in this case a trend) tends to continue in motion until some external forces causes it to change
direction. A number of technical tools are available to traders to assist in the difficult task of spotting reversal signals,
including the study of support and resistance levels, price patterns, trendlines, and moving averages. Some indicators can
provide even earlier warning signals of loss of momentum. All of that not withstanding, the odds usually favor the the
existing trend will continue.
The most difficult task for a Dow theorist, or any trend-follower for that matter, is being able to distinguish between a
normal secondary correction in an existing trend and the first leg of a new trend in the opposite direction. Dow theorists
often disagree as to when the market gives an actual reversal signal.

Potrebbero piacerti anche