How Artificial Intelligence Identifies Candlesticks

Logic Strategy machine learning to identify different candlesticks

The logic strategy uses various aspects of artificial intelligence, genetic algorithms and neural networks to identify candlesticks from price data. Here we will be fully transparent on how the Logic strategy uses price data to dynamically identify different candle

Step 1: Break each candlestick into 7 ratios

Firstly, the logic strategy identifies 4 inferred variables:

  1. Body size = Open - Close

  2. Upper wick length = High - Top of "Body size"

  3. Lower wick length = Low - Bottom of "Body size"

  4. Total size of candle = High - Low

Now with the 4 inferred variables the Logic Strategy looks for a specific candle type from profession recognition, this varies from candle to candle. What it is primarily searching for is the ratios between the "4 inferred variables".

The 7 ratios are:

  • Body size to Upper wick length,

  • Body size to Lower wick length

  • Body size to Total size of candle

  • Upper wick length to Lower wick length

  • Upper wick length to Total size of candle

  • Lower wick length to Total size of candle

  • Whether the candle is bullish or bearish

Step 2: Build a training set using a professional that identified X type of candles (shooting star)

This step requires a qualified financial engineer, such as a logikfx employee. To collect a large list of candlesticks which are shooting stars (candlestick type). The data must include price data: open, high, low and close.

The 1 in the 5th column means it is a specified candle type, if it was 0 it would mean it is not a specified candle and it doesn't meet the criteria of the ratios.

Once the Logic Strategy acquires these values, it can now start learning what a certain candlestick type is.

To make sure the Artificial intelligence is identifying the candlestick type correctly we include candles which are not shooting stars.

These are further down the list which will be marked as 0 in the far right column.

Step 3: Numerical Identification of Candlestick

This step is where the logic strategy uses the numbers from above to work out what the candle will look like. This is the same way a professional would identify a candlestick type visually.

Once the logic strategy knows these types of variables and values are a shooting star candlestick it can now identify them in the future, how a professional would see them on the chart. This is much better than hard coded candlesticks because hard code struggles to differentiate between different candlesticks.

Using machine learning, neural networks and genetic algorithms the logic strategy can dynamically identify candlesticks automatically to be used in analysis. If there is a candlestick we do not believe should be in the identification then we add that to the training set list and the artificial intelligence will learn to remove it from the classification.

To keep up to date with education, analysis and research head to our info centre.

114 views0 comments

Recent Posts

See All

Do you want better trades?

Hey, we're Logikfx. We're determined to make consistent trading a reality for all. Get email notifications of all our up-coming trade ideas and much more. The question is, are you ready?



Logikfx is a leading source of financial trading education, technology and indicators, ranging from macro currency strength to forex and stock related videos, articles, webinars, and courses.


Featured as a 'Top Trading Platform Company in the UK (2021)' - by Daily Finance


Nominated as ‘Best Forex Education & Training UK 2021’ - by Global Banking and Finance Review


Nominated as ‘Best New Forex Education & Training UK 2020’ - by Global Banking and Finance Review

Macro Currency Strength Meter ranked as 'best automation tool for retail traders' - by E-Forex Magazine

©2017 - 2021 Logik Fx Ltd




The Colmore Building, 

20 Colmore Circus Queensway, 


B4 6AT 

United Kingdom

Business Hours

Mon - Fri: 8am to 11pm

Sat: 6am to 11am

Sun: Closed


Trading in securities can lead to significant losses, that may exceed your initial investment. You should seek advice from a licensed professional to determine if trading is for you. Logik Fx Limited is not an investment advisor. Further, owners, employees, agents or representatives of Logik Fx Limited are not acting as investment advisors. All persons and entities (including their representatives, agents, and affiliates) contributing to the content on this website are not providing investment or legal advice. Nor are they making recommendations with respect to the advisability of investing in, purchasing or selling securities, nor are they rendering any advice on the basis of the specific investment situation of any particular person or entity.


All information on this website is strictly informational and is not to be construed as advocating, promoting or advertising registered or unregistered investments of any kind whatsoever. All of the information on this website is for educational purposes only and is not to be construed as investment or trading advice. ​For the full disclaimer click here.