New Software Stock Market Tools SMT1:

discover the power of AI Stock Market forecast and trading simulation
- increase your trading profitability

2012-02-01

Automated Recognition of Candlestick Patterns

The idea of using the chart with candlesticks (or candles) for predicting market prices is very old. Two centuries ago, Japanese rice trader found that the candlesticks pattern chart could be used as a tool to predict future prices in a free market with a natural demand-supply balance. The method was improved later by others and today it is successfully used by many traders and investors in the stock market.

A candlestick is presented using high, low, opening, and closing prices during a certain trading period, for example, trading day. A regular candlestick figure consists of Real Body, Upper Shadow, and Lower Shadow. The Real Body size is proportional to the difference between opening and closing prices. Real Body can be two types - white (green) for uptrend and black (red) for downtrend. Upper Shadow size is proportional to the difference between either high price and closing price in case of uptrend or high price and opening price in case of downtrend. Similarly, Lower Shadow size is proportional to the difference between either low price and opening price in case of uptrend or low price and closing price in case of downtrend.



The number of candlesticks that is normally used for predicting can range within 1..12. Evidently, the number of different combinations of several candlesticks in a row can be big. Some believe that there are only 12 major candlestick patterns, others consider this number is 70 or even more. Anyway, in case of chart analysis, it is necessary to remember at least major patterns and process many charts in order to make forecast successful.

Apparently, statistical methods combined with computer power can be a good solution to make the candlestick patterns recognition work less time-consuming and more effective. For example, Neural Network (NN) can help to automate a candlestick patterns recognition task. NN should be properly trained in order to be able to recognize and predict further movements. One of the obvious problems of implementing a candlestick pattern NN predicting system is a formalization of inputs, i.e., the way how to express each candlestick shape and relative position of all candlesticks in numerical values.

Preparing Data for Neural Network. The idea is simple - look at several candlesticks, recognize pattern, and predict the next candlestick. But how to convert a candlestick shape in numerical values? For simplicity, let's consider one major characteristic of each candlestick. In case of using six candlesticks to predict the performance within the next seventh one (actually the value of Real Body can be considered as an equivalent of performance), the data row for training neural network would be presented by the following:



In reality we need to use more input parameters including shadows, relative position of each candlestick, etc. so that it can be, for example, 60 inputs for each row:



The candlesticks pattern can be formalized in different ways. Which one is the best? It may depend on the type of NN that is used and statistical characteristic of input data. Evidently, only practical testing (out-of-sample test) can indicate which formalization can give the best result for most cases. Logically, all numbers that describe candlestick shape should be expressed in relative units. For example, Real Body size can be converted using the following formula:

RB = 100% * (C - O) / O

where RB - Real Body relative size, C - closing price, O - opening price.

Two more numbers can express the Upper an Lower Shadows relatively to Real Body. The following figure shows distances that used for calculation relative Upper and Lower Shadows:


US = 100% * c / a
LS = 100% * c / b

where US, LS - relative Upper and Lower Shadows correspondingly. US and LS can have values within 0..100%; minimum value equals 0 if Real Body size equals 0, and maximum value equals 100 if Shadow size equals 0.

Therefore, we can use these three numbers for formalizing one candlestick. The number of candlesticks that can be used for historical period can be up to 12. So that the number of inputs for NN can be equal 3 * 12 = 36.

Two More Inputs for Candlestick Pattern Recognition. As it was discussed above, we can use three major numbers to describe the pattern of one candlestick - relative size of Real Body, relative size of Upper Shadow and Lower Shadow. Also we can use 12 candlesticks with these three parameters for each as inputs. However, it would be insufficient to use only these parameters since each candlestick can have different position and their relative position traditionally is used for the analysis and prediction.

The simplest position parameter would be a percentage deviation from an average of all candlesticks position. It could be just closing prices of each period of candlestick. The formula for calculation:


CPi = 100% * (Ci / Caver - 1)

where CPi - relative position of i-candlestick; Ci - closing price of i-candlestick; Caver - average of all closing prices (all 12 candlesticks).

Except above introduced parameter, it could be reasonable to add one more parameter to distinguish negative and positive candlesticks (black and white) since it makes a significant difference to investors' psychology. So that each black candlestick would have 0 value, white - 1. To summarize, 5 parameters multiplied by 12 (the total number of candlesticks) give 60 inputs.

Numerous tests show many possibilities of improving NN candles patterns recognition abilities. For example, output result can be composed from selected optimized calculations based on different historical periods. As well as, there are many other different ways to formalize the shapes and relative positions of candlesticks.

Optimal Solution. There is an automated tool FTA-2 (free use of fully-functional version for one month). It has module which enables using Neural Network to recognize typical candles patterns and predict future prices. This module predicts only one next candle but the candles pattern prediction can be successfully used for different widths of candle, i.e., the number of trading days in one candle. The module is enhanced to calculate result that is composed from different historical periods that allows making the forecast more accurate. Also it can perform comparative forecast analysis for many symbols.

Useful resources:
  • Candlestick basics - major signals
  • Neural Network basics - introduction
  • The software which enables using Neural Network to recognize typical candles patterns and predict future prices - about FTA-2

14 comments:

  1. Hello everyone, have a nice article. I read this post and get lot of important news. I sharing this post some of my close friends and they accede to visit this site. Thanks
    Graphic card

    ReplyDelete
  2. There are several patterns to making this project through a good trainer.For this they must need some practical training so that while doing this work they may not face any harassment to solve this.







    Computer Memory Cooling

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Thanks for providing recent updates regarding the concern, I look forward to read more. Candlesticks For Beginners

    ReplyDelete
  5. MacPrices is your definitive site for Apple price tracking. They compare prices on MacBooks, iMacs, Mac minis, Mac Pros, iPads, iPods and iPhones from various authorized resellers and give you the best price available. Product reviews and market news.
    Website macprices.net

    ReplyDelete
  6. I am going to share with you one very simple strategy based on a strong and easily noticeable candlestick pattern. They call it "Lucky Spike".
    Everyone can learn it, use it and make money with it.
    There are traders who make a living trading just this pattern.
    Just check out this ebook I am giving you for free:==> http://www.forexmystery.com?hgd4h84gd

    ReplyDelete
  7. i read a considerable measure of stuff and i found that the method for composing to clearifing that precisely need to say was great so i am inspired and ilike to come back again in future.. free stock course

    ReplyDelete
  8. The Le_Meridian Funding Service went above and beyond their requirements to assist me with my loan which i used expand my pharmacy business,They were friendly, professional, and absolute gems to work with.I will recommend  anyone looking for loan to contact. Email..lfdsloans@lemeridianfds.com  Or lfdsloans@outlook.com.WhatsApp ... + 19893943740.

    ReplyDelete
  9. MacPrices is your definitive site for Apple price tracking. They compare prices on MacBooks, iMacs, Mac minis, Mac Pros, iPads, iPods and iPhones from various authorized resellers and give you the best price available. Product reviews and market news.
    Website macprices.net

    ReplyDelete
  10. MacPrices is your definitive site for Apple price tracking. They compare prices on MacBooks, iMacs, Mac minis, Mac Pros, iPads, iPods and iPhones from various authorized resellers and give you the best price available. Product reviews and market news.
    Website macprices.net

    ReplyDelete
  11. MacPrices is your definitive site for Apple price tracking. They compare prices on MacBooks, iMacs, Mac minis, Mac Pros, iPads, iPods and iPhones from various authorized resellers and give you the best price available. Product reviews and market news.
    Website macprices.net

    ReplyDelete
  12. MacPrices is your definitive site for Apple price tracking. They compare prices on MacBooks, iMacs, Mac minis, Mac Pros, iPads, iPods and iPhones from various authorized resellers and give you the best price available. Product reviews and market news.
    Website macprices.net

    ReplyDelete
  13. MacPrices is your definitive site for Apple price tracking. They compare prices on MacBooks, iMacs, Mac minis, Mac Pros, iPads, iPods and iPhones from various authorized resellers and give you the best price available. Product reviews and market news.
    Website macprices.net

    ReplyDelete
  14. Do you need Personal Loan?
    Business Cash Loan?
    Unsecured Loan
    Fast and Simple Loan?
    Quick Application Process?
    Approvals within 24-72 Hours?
    No Hidden Fees Loan?
    Funding in less than 1 Week?
    Get unsecured working capital?
    Contact Us At : gaincreditloan1@gmail.com
    Whatsapps +1-(551) 356-3808 (call/WhatsApp)

    ReplyDelete