CapeTools Technical Analysis - Pattern Recognition
http://www.QuantTools.com
In total there are 59 functions present within the CapeTools Technical Analysis - Pattern Recognition category of functions.
General Description
Functions to apply technical analysis on historical data objects (created via the MakeHistoricalDB() function) using Pattern Recognition techniques.
The algorithms used were taken from the TA-SDK library (www.ta-lib.org). Please view this site for a complete description of the methodologies and pricing equations.
The candlestick techniques we use today originated in the style of technical charting used by the Japanese for over 100 years before the West developed the bar and point-and-figure analysis systems. In the 1700s a Japanese man named Homma, a trader in the futures market, discovered that, although there was a link between price and the supply and demand of rice, the markets were strongly influenced by the emotions of the traders. He understood that when emotions played into the equation a vast difference between the value and the price of rice occurred. This difference between the value and the price is as applicable to stocks today as it was to rice in Japan centuries ago. The principles established by Homma are the basis for the candlestick chart analysis, which is used to measure market emotions towards a stock.
This charting technique has become very popular among traders. One reason is that the charts reflect only short-term outlooks--sometimes lasting less than eight to 10 trading sessions. Candlestick charting is a very complex and sometimes difficult system to understand
When first looking at a candlestick chart, the student of the more common bar charts may be confused; however, just like a bar chart, the daily candlestick line contains the market's open, high, low and close of a specific day. Now this is where the system takes on a whole new look: the candlestick has a wide part, which is called the 'real body'. This real body represents the range between the open and close of that day's trading. When the real body is filled in or black, it means the close was lower than the open. If the real body is empty, it means the opposite: the close was higher than the open.
Just above and below the real body are the "shadows". Chartists have always thought of these as the wicks of the candle, and it is the shadows that show the high and low prices of that day's trading. If the upper shadow on the filled-in body is short, it indicates that the open that day was closer to the high of the day. And a short upper shadow on a white or unfilled body dictates that the close was near the high. The relationship between the day's open, high, low, and close determine the look of the daily candlestick. Real bodies can be either long or short and either black or white. Shadows can also be either long or short.
Within a chart you will typically see 'long black body', or 'long black line' bars. The long black line represents a bearish period in the marketplace. During the trading session, the price of a stock can be up and down in a wide range and can open near the high and close near the low of the day.
By representing a bullish period, the 'long white body', or 'long white line' is the exact opposite of the long black line. Prices can be all over the map during the day, but the stock can open near the low of the day and close near the high.
'Spinning tops' are very small bodies and can be either black or white. This pattern shows a very tight trading range between the open and the close, and it is considered somewhat neutral.
'Doji lines' illustrate periods in which the opening and closing prices for the period are very close or exactly the same. You will also notice that, when you start to look deep into candlestick patterns, the length of the shadows can vary.
White candlestick: If the close is higher than the open, the real body is white. A white (Yang) candlestick indicates buying dominance after the open.
Black candlestick: If the close is lower than the open, the real body is filled in black. A black (Yin) candlestick indicates selling dominance after the open.
The real body is the most important part of each candlestick. The shade (white or black) and length of the real body reveals whether the bulls or bears are dominant during the main period of trading. A long white real body implies that the bulls are in charge. A long black real body implies that the bears are in charge. Candlesticks with very small real bodies, where the difference between the open and close are relatively tiny compared to normal trading ranges, imply that neither side is currently in charge and, furthermore, that the previous trend may be worn out.
Shadows are the part of the price range that lies outside the real body's open-to-close price range. Shadows are represented as thin lines extending from the real body to the extreme high and low prices for the period, above and below the real body. The peak of the "upper shadow" is the high of the period, while the bottom of the "lower shadow" is the low of the period.
Marubozu lines lack shadows at one or both extremes: The open and/or the close is the extreme high or low price of the period. Major Yang Marubozu lines have the close equal to the extreme high and indicate extreme buying, which is bullish. Major Yin Marubozu lines have the close equal to the extreme low and indicate extreme selling, which is bearish. When the opening is the low, there is buying dominance during the period, which is bullish. When the opening is the high, there is selling dominance during the period, which is bearish.
The length and position of the shadows are meaningful. A tall upper shadow implies that the market rejected higher prices and is heading lower. A long lower shadow implies that the market rejected lower prices and is heading higher. Very long shadows, both upper and lower, are known as high-wave lines, and these indicate that the market has lost its sense of direction. Multiple high-wave lines indicate trend reversal.
Function list.
- TA_CDL2CROWS - Two Crows, The Two Crows Pattern is a 3-day pattern.
- TA_CDL3BLACKCROWS - Three Black Crows, The Three Black Crows got their name from the resemblance of three crows looking down from their perch from a tree.
- TA_CDL3INSIDE - Three Inside Up/Down, Note that after the long candle day that is in the same direction of the trend that the Harami pattern occurs.
- TA_CDL3LINESTRIKE - Three-Line Strike : This function is contained within the Pattern Recognition set of indicators.
- TA_CDL3OUTSIDE - Three Outside Up/Down : This function is contained within the Pattern Recognition set of indicators.
- TA_CDL3STARSINSOUTH - Three Stars In The South, The slow down of the trend is visually obvious.
- TA_CDL3WHITESOLDIERS - Three Advancing White Soldiers, The Three White Soldiers (also known as The Advancing Three White Soldiers) is a healthy market reversal pattern.
- TA_CDLABANDONEDBABY - Abandoned Baby, A rare reversal pattern characterized by a gap followed by a Doji, which is then followed by another gap in the opposite direction.
- TA_CDLADVANCEBLOCK - Advance Block, The Advance Block is somewhat indicative as the Three White Soldiers but it is a bearish signal.
- TA_CDLBELTHOLD - Belt-hold, The Belt Hold lines are formed by single candlesticks.
- TA_CDLBREAKAWAY - Breakaway, If a trend has been evident, the breakaway pattern, whether bullish or bearish initially indicates the acceleration of that trend.
- TA_CDLCLOSINGMARUBOZU - Closing Marubozu, a Closing Marubozu has no shadow at it's closing end.
- TA_CDLCONCEALBABYSWALL - Concealing Baby Swallow, The first two days of the signal, two Black Marubozus, demonstrate the continuation of the downtrend.
- TA_CDLCOUNTERATTACK - Counterattack, Meeting Lines (or Counterattack Lines) are formed when opposite coloured bodies have the same closing price.
- TA_CDLDARKCLOUDCOVER - Dark Cloud Cover, The dark Cloud Cover is the bearish counterpart to the Piercing pattern.
- TA_CDLDOJI - Doji, the Doji is one of the most important signals in candlestick analysis.
- TA_CDLDOJISTAR - Doji Star, Upon seeing a Doji in an overbought or oversold condition, an extremely high probability reversal situation becomes evident.
- TA_CDLDRAGONFLYDOJI - Dragonfly Doji, The Dragonfly Doji occurs when trading opens, trades lower, then closes at the open price which is the high of the day.
- TA_CDLENGULFING - Engulfing Pattern, Two of the most compelling candlestick signals are the Bullish Engulfing Pattern and Bearish Engulfing Pattern.
- TA_CDLEVENINGDOJISTAR - Evening Doji Star, A three day bearish reversal pattern similar to the Evening Star.
- TA_CDLEVENINGSTAR - Evening Star, The Evening Star pattern is a top reversal signal.
- TA_CDLGAPSIDESIDEWHITE - Up/Down-gap side-by-side white lines, The Up Side By Side White Lines Pattern appears in a bullish market.
- TA_CDLGRAVESTONEDOJI - Gravestone Doji, The Gravestone Doji is formed when the open and the close occur at the low end of the trading range.
- TA_CDLHAMMER - Hammer, The Hammer is comprised of one candle.
- TA_CDLHANGINGMAN - Hanging Man, The Hanging Man is also comprised of one candle.
- TA_CDLHARAMI - Harami Pattern, The Harami is an often seen formation.
- TA_CDLHARAMICROSS - Harami Cross Pattern, A two day pattern similar to the Harami (see TA_CDLHARAMI() ), the difference is that the last day is a Doji.
- TA_CDLHIGHWAVE - High-Wave Candle : This function is contained within the Pattern Recognition set of indicators.
- TA_CDLHOMINGPIGEON - Homing Pigeon, The Homing Pigeon is the same as the Harami, except for the colour of the second day's body.
- TA_CDLIDENTICAL3CROWS - Identical Three Crows, The Three Identical Crows have the same criteria as the Three Black Crows.
- TA_CDLINNECK - In-Neck Pattern, The In Neck pattern is almost a Meeting Line pattern.
- TA_CDLINVERTEDHAMMER - Inverted Hammer, The Inverted Hammer is comprised of one candle.
- TA_CDLKICKING - Kicking, The Kicker signal is the most powerful signal of all.
- TA_CDLKICKINGBYLENGTH - Kicking - bull/bear determined by the longer marubozu, The Kicker signal is the most powerful signal of all.
- TA_CDLLADDERBOTTOM - Ladder Bottom, The downtrend is finishing with four consecutive black candles, each closing lower than the previous day.
- TA_CDLLONGLEGGEDDOJI - Long Legged Doji, The Long-legged Doji is composed of long upper and lower shadows.
- TA_CDLLONGLINE - Long Line Candle, A long day (LONGLINE) represents a large price move from open to close.
- TA_CDLMARUBOZU - Marubozu, in Japanese, Marubozu means close cropped or close-cut.
- TA_CDLMATCHINGLOW - Matching Low, The Matching Low pattern is similar to the Homing Pigeon patter, the exception being that the two days of the pattern close on their lows, at the same level.
- TA_CDLMATHOLD - Mat Hold, The pattern appears during an uptrend, which is further confirmed by the first long white candlestick.
- TA_CDLMORNINGDOJISTAR - Morning Doji Star, A three day bullish reversal pattern that is very similar to the Morning Star.
- TA_CDLMORNINGSTAR - Morning Star, The Morning Star is a bottom reversal signal.
- TA_CDLONNECK - On-Neck Pattern, The On Neck Line pattern is almost a 'meeting line pattern', but the critical term is 'almost'.
- TA_CDLPIERCING - Piercing Pattern, The Piercing Pattern is composed of a two-candle formation in a down trending market.
- TA_CDLRICKSHAWMAN - Rickshaw Man, Rickshaw man is a specific type of long-legged doji where the open and close are in the middle of the price range.
- TA_CDLRISEFALL3METHODS - Rising/Falling Three Methods, The Falling Three Method is basically the opposite of the Rising Three Method, The market has been in a downtrend.
- TA_CDLSEPARATINGLINES - Separating Lines, You can identify it from the following points: The first day is a long white candle.
- TA_CDLSHOOTINGSTAR - Shooting Star, The Shooting Star is comprised of one candle.
- TA_CDLSHORTLINE - Short Line Candle, Short days (SHORTLINES) can be interpreted by the same analytical process of the long candles.
- TA_CDLSPINNINGTOP - Spinning Top, spinning Tops are depicted with small bodies relative to the shadows.
- TA_CDLSTALLEDPATTERN - Stalled Pattern, Another pattern close to the Three White Soldiers pattern is the Stalled Pattern (commonly known as the Deliberation pattern).
- TA_CDLSTICKSANDWICH - Stick Sandwich, The Stick Sandwich looks somewhat like an ice cream sandwich.
- TA_CDLTAKURI - Takuri (Dragonfly Doji with very long lower shadow) : This function is contained within the Pattern Recognition set of indicators.
- TA_CDLTASUKIGAP - Tasuki Gap, The Upside Tasuki Gap is found in a rising trend.
- TA_CDLTHRUSTING - Thrusting Pattern, The Thrusting pattern is almost an 'On Neck' or an 'In Neck' pattern and resembles the Meeting Line pattern, also.
- TA_CDLTRISTAR - Tristar Pattern, The Tri Star pattern is relatively rare.
- TA_CDLUNIQUE3RIVER - Unique 3 River, The Unique Three River Bottom is a bullish pattern, somewhat characteristic of the Morning Star Pattern.
- TA_CDLUPSIDEGAP2CROWS - Upside Gap Two Crows, The Upside Gap Two Crows is a three-day pattern.
- TA_CDLXSIDEGAP3METHODS - Upside/Downside Gap Three Methods, the Bullish Upside Gap Three Methods Pattern, the market is in a strong bullish mood.
Copyright (c) 2003-2007 CapeTools - All Rights Reserved.