Finally, paper [ 19 ] has found that there exist types of candlesticks that frequently tend to appear close to the trend-reversal regions and others that cannot be found in such regions. Through reviewing the relevant literatures, this paper considers that the main reason is that the existing K-line patterns are lack of rigorous mathematical definition.
For example, the shadow length and body size are not defined clearly in the definition of K-line patterns, which means that a K-line pattern has many different shapes. Because the predictive power of a pattern may vary a lot for different shapes. Suppose that shape A has predictive power, and shape B and C do not have predictive power.
When studying the predictive power of TIU pattern, if we ignore the shape difference between the three patterns and research them as a whole, then we will come to the wrong conclusion that TIU pattern has no predictive power. However, if the three patterns are classified further based on shape features and researched separately, then we can get the correct conclusion that TIU pattern has predictive power only at shape A.
In addition, another reason is that, as the existing K-line patterns are mined by artificial means, there may be some spurious pattern in them. The rest of this paper is organized as follows. In Section 2 , we firstly shortly introduce K-line, K-line technology analysis, and K-line patterns. Then we define the similarity match model and nearest neighbor-clustering algorithm of K-line series.
Section 4 presents the experimental result and discussion. Section 5 concludes the paper. Firstly, we give the mathematic definition of K-line series. Let represent the -th K-line series of any stock, and let represent t -th K-line in ; then where is the number of elements in , which is also called the length of. As defined in literature [ 4 — 6 ], the K-line is drawn by four basic elements: close price, open price, high price, and low price, where the part between the close price and open price is drawn into a rectangle called body of K-line and the part between the high price and body is drawn into a line called upper shadow of K-line.
Moreover, the part between the lower price and body is drawn into a line called lower shadow of K-line. This kind of very personalized lines consisting of upper shadow, lower shadow, and body is called K-line. In the K-line, if open price is lower than close price, K-line also called Yang line, the body is usually filled with white or green color, as shown in Figure 2 a.
And if open price is higher than close price, K-line also called Yin line, the body is usually filled with black or red color, as shown in Figure 2 b. Moreover, if open price is equal to close price, K-line also called Doji line, the body then collapses into a single horizontal line, as shown in Figure 2 c. It is important to note that the body color of Yin line and Yang line is different in Chinese stock market and stock markets of European and American.
In Chinese stock market, the body color of Yang line and Yin line is red and green, respectively. However, the body color of Yang line and Yin line is green and red, respectively, in the stock markets of European and American. Firstly, we introduce and define some key concepts of K-line technology analysis.
It is the average of stock price for some time. The three-day moving average at time is defined by where denotes the close price of. Uptrend is defined analogously. It is used to describe the general trend of stock prices for some time, including uptrend and downtrend. If the future trend of stock price is rising, it is called bullish market. In contrast, if the future trend of stock price is descending, it is called bearish market.
Moreover, a more intense rising or descending trend indicates a more typical bullish or bearish market. The capability of a K-line patter for predicting the bullish market and bearish market is defined in formulas 17 and 18 , respectively.
Many K-line patterns have been mined up to now, as shown in literatures [ 4 — 6 ]. Let represent a three-day K-line series. That is, the second day is Yang line and must be contained with the body of the first day. That is, the third day is Yang line and closes above the open of the first day. A standard TIU pattern is shown in Figure 3 a.
The predictive power of TIU pattern from the existing literature is that TIU is a trend-reversal pattern, which gives the bullish market signal. This means when the TIU pattern appears, the stock prices will be likely to be transferred from downtrend into uptrend or the stock market would be changed from bearish market to bullish market, and the stock prices would rise gradually.
The conditions of becoming the TID pattern are as follows: 1 is an uptrend, and. That is, the second day is Yin line and must be contained within the body of the first day. A standard TID pattern is shown in Figure 3 b. The predictive power of TID pattern from the existing literature is that TID is a trend-reversal pattern, which gives the bearish market signal.
That means, after the TID pattern appears, the stock prices will be likely to be transferred from uptrend into downtrend or the stock market would be changed from bullish market to bearish market, and the stock prices would fall gradually. The similarity match of K-line series is an essential and basis task for K-line series clustering. In the literature, however, there are few papers focusing on the similarity match of K-line series.
Only paper [ 20 ] studies the similarity match method and search algorithm of K-line series using image retrieval technology. In addition, paper [ 19 , 21 ] proposes the similarity match model of K-line series based on the traditional Euclidean distance. However, the K-line trend is determined by the close price change, open price change, high price change, low price change, and the size relationship between close price and open price.
Therefore, if we want to match the similarity between two K-line series, we should calculate the similarity of K-line price changes instead of the similarity of price values. As the changes of K-line price are not shown in the K-line chart, K-line prices distance rather than K-line price changes distance is used in the similarity match model of literature [ 19 — 21 ]. This means that these match models belong to similarity match methods based on K-line price values rather than K-line price changes.
Therefore, they cannot accurately measure the similarity of stock prices trend in the K-line series. For example, assuming that there are two K-line series and needed to match their similarity, where and indicate their similarity. Let , , , , and indicate the close price change rate of at day , which is calculated by , denotes the similarity between and , then , and.
We cannot calculate the correct result of by the similarity match model in literature [ 19 — 21 ]. Similarly, the same problems would occur for calculating the similarity of open price, high price, or low price. Therefore, this paper proposes a new similarity match model based on K-line price changes to measure the trend similarity between two K-line series.
Then based on these two kinds of similarity models, the similarity model of the entire K-line series could be built. According to the shape feature of K-line, this paper proposes using the shape distance to measure the shape similarity between two K-lines. Firstly, based on the shape structure of K-line, three components of K-line shape are extracted: the upper shadow shape, the lower shadow shape, and the body shape.
Secondly, the similarity match methods of three shapes are defined, respectively. Let denote the upper shadow length of , as defined in the following formula: where is used to normalize the upper shadow length. Let denote the upper shadow similarity between and , as defined by. Let denote the lower shadow length of , as defined in the following formula:. Let denote the lower shadow similarity between and , as defined by. Let denote the body length of , as defined in the following formula:.
Let denote the body similarity between and , as defined by. Let denote the shape similarity between and , as defined by where , , and represent the weight of , , and , respectively. Let denote the shape similarity between and , as defined by where represent the weight of. Thanks to the idea that each K-line can be given different weight, the K-line series having special shape features could be identified well.
For computing the similarity between two K-line series, we not only consider the shape similarity of K-line series but also the position similarity. If we only consider the shape similarity, then it will cause the problem that two K-line series having same shape features but different position features will have the same similarity.
For example, supposing that the K-line series chart of and is shown in Figure 2 , we can see that, according to the shape feature definition of K-line, all of the corresponding K-lines of and have the same shape features. These mean that and have identical shape features; that is,. However, as is vividly shown in Figure 4 , the relative positions of and are different though and have the same relative position in the K-line series. If we only consider the shape similarity, we will draw the wrong conclusion that.
Therefore, the position similarity model of K-line series based on K-line coordinate is defined as follows. Let denote the coordinate of , which are defined in the following formula:. Let denote the position similarity between and , as defined by. Let denote the position similarity between and , as defined by where represents the weight of. Thanks to the idea that each K-line can be given different weight, the K-line series having special coordinates could be identified well.
Finally, based on the shape similarity and position similarity, the similarity of K-line series could be obtained. Therefore, the similarity match model between and is defined by where and represent the shape similarity weight and position similarity weight of K-line series, respectively. The more accurate classification result of K-line patterns can be gotten by clustering them using the nearest neighbor-clustering algorithm based on the similarity match model of K-line series.
In addition, represents the number of elements in. As each K-line series will be matched once with all of the K-line series stored in the cluster, the time complexity and space complexity of KNNCA are both. We define some statistical indicators about stock prices, which we use to mine stock prediction knowledge from each cluster.
Paper [ 22 ] found that K-line technology is suited for short-term investment prediction and that the most efficient time period for prediction is 10 days. Let denote a three-day K-line pattern; its consequent K-line series is denoted by. The statistical indicators of are defined as follows. As Yahoo provides the finance stock API used to download the transaction data of Chinese stock market, the stock transaction data of Chinese A-share market in any time can be acquired based on the API.
To get a representative testing data, we select the K-line series data of Shanghai index component stocks over the latest 10 years from to as the test data. We choose the top 20 clusters with the most elements to conduct statistical analysis, as shown in Table 1. Its is only 0. However, after further classifying the TIU patterns, we can see that 1 , , , and so forth have a strong capability for predicting bullish market, because their both are above 0.
Particularly for , its is only 0. By comparing the predictive power of and , as shown in Figure 5 , we can see that the predictive result of is bullish market while that of is bearish market, which means that their predictive power is opposite. The result of experiment one shows that 1 the predictive power of TIU varies a great deal for different shapes and 2 to be a better pattern for predicting bullish market, the TIU pattern badly needs to be further classified, which are consistent with the expected analysis.
We choose the top 20 clusters with the most elements to conduct statistical analysis, as shown in Table 2. Similarly, the TID pattern may be also a spurious pattern to predict bearish market because of is 0, where represents the cluster composed of TID patterns. Moreover, after further classifying the TID patterns, we can see that except for and , almost all of the clusters have a weak capability for predicting bearish market, as their entire are below 0.
Therefore, we can consider that the TID pattern is definitely a spurious pattern, which is also consistent with the expected analysis. Through the above experiment, we can draw the following conclusion. Therefore, to analyze the predictive power of a pattern, we should make a concrete analysis of concrete shapes.
Therefore, in order to improve the stock prediction performance based on K-line patterns, we need to further classify the existing patterns based on the shape feature, identify all the spurious patterns, and choose the patterns having stronger predictive power to predict the stock price. The entry is when the perimeter of the triangle is penetrated — in this case, to the upside making the entry 1.
The stop is the low of the pattern at 1. The profit target is determined by adding the height of the pattern to the entry price 1. The height of the pattern is 25 pips , thus making the profit target 1. Candlestick charts provide more information than line, OHLC or area charts. For this reason, candlestick patterns are a useful tool for gauging price movements on all time frames. While there are many candlestick patterns, there is one which is particularly useful in forex trading.
An engulfing pattern is an excellent trading opportunity because it can be easily spotted and the price action indicates a strong and immediate change in direction. In a downtrend, an up candle real body will completely engulf the prior down candle real body bullish engulfing. In an uptrend a down candle real body will completely engulf the prior up candle real body bearish engulfing.
The pattern is highly tradable because the price action indicates a strong reversal since the prior candle has already been completely reversed. The trader can participate in the start of a potential trend while implementing a stop. In the chart below, we can see a bullish engulfing pattern that signals the emergence of an upward trend.
The entry is the open of the first bar after the pattern is formed, in this case 1. The stop is placed below the low of the pattern at 1. There is no distinct profit target for this pattern. Ichimoku is a technical indicator that overlays the price data on the chart.
While patterns are not as easy to pick out in the actual Ichimoku drawing, when we combine the Ichimoku cloud with price action we see a pattern of common occurrences. The Ichimoku cloud is former support and resistance levels combined to create a dynamic support and resistance area.
Simply put, if price action is above the cloud it is bullish and the cloud acts as support. If price action is below the cloud, it is bearish and the cloud acts as resistance. By using the Ichimoku cloud in trending environments, a trader is often able to capture much of the trend. In an upward or downward trend, such as can be seen in below, there are several possibilities for multiple entries pyramid trading or trailing stop levels.
In a decline that began in September, , there were eight potential entries where the rate moved up into the cloud but could not break through the opposite side. Entries could be taken when the price moves back below out of the cloud confirming the downtrend is still in play and the retracement has completed. The cloud can also be used a trailing stop, with the outer bound always acting as the stop. In this case, as the rate falls, so does the cloud — the outer band upper in downtrend, lower in uptrend of the cloud is where the trailing stop can be placed.
This pattern is best used in trend based pairs , which generally include the USD. There are multiple trading methods all using patterns in price to find entries and stop levels. Forex chart patterns, which include the head and shoulders as well as triangles, provide entries, stops and profit targets in a pattern that can be easily seen.
The engulfing candlestick pattern provides insight into trend reversal and potential participation in that trend with a defined entry and stop level. The Ichimoku cloud bounce provides for participation in long trends by using multiple entries and a progressive stop. As a trader progresses, they may begin to combine patterns and methods to create a unique and customizable personal trading system.
Technical Analysis Basic Education. Trading Skills. Day Trading. Advanced Technical Analysis Concepts. Your Money. Personal Finance. Your Practice. Popular Courses. Table of Contents Expand.
In order numerous email check out VirtualHere to inconsistent state. Matthew Read machine already moving files are not. Comodo Antivirus controls are.
Ichimoku is a technical indicator that overlays the price data on the chart. While patterns are not as easy to pick out in the actual Ichimoku drawing, when we. Learn which technical indicators are the best and most profitable when trading forex. Traders use technical indicators to gain additional insight into the price action of an asset. · Relative strength index · Eager to learn more?