![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Yes it does, but I'm sorry - the problem is solved head-on, it's not the best option to correct the ifs every time
Here if divided into 3 groups each group is divided into 4 variants in the end 12 types of candles that can form on the chart at all. As for the head-on, try to come up with your own variant but I think it will be a bit complicated for you
He already did that about five years ago.
cool!
Let me try to formalise the task: develop a method for determining the mutual positioning of bars for the 5 given examples
1. red bar Open > Close
2. in example 1, the red bar's High and the green bar's Low are insignificant or may be absent (the rest of the examples by analogy) set by a constant in pp
1. 2. 3. 4. 5.
how to effectively code this "shit" for these 5 examples?
Have you even noticed that your 4th and 5th patterns, in terms of movement pattern, are different from the 1-3rd.
The first 3 (if you don't take the shallow pullback in the 3rd) has two movements (attack-back), whereas the 4th-5th (if you take away the noise in the 5th) has 4-re movements (attack-correction-attack after correction-back).
And that in 5 years, still no progress?
I didn't have much time for programming - I worked and earned a lot, I had a mortgage to close http://www.mreporter.ru/reports/44471
Now I need some thoughts on how to describe candlestick analysis in human language, all I can do is like this:
like this code can change the alphabet to look for new patterns
In the first 3 (if we exclude the shallow pullback in 3) there are two movements (attack-correction-retreat), while in 4-5 (if we remove the noise in 5) there are 4 movements (attack-correction-attack after correction-back).
I had no time for programming - I worked and earned a lot, I needed to close the mortgage
Now I need some thoughts on how to describe candlestick analysis in human language, all I can do is like this:
I think it is possible to change the alphabet to search for new patternsHere's a thought: slicing bars can distort patterns.
The solution may be found through recalculation of bars with an offset of their onset at lower timeframes, we create several charts and at some one the necessary figure will appear (if it is there at all) and then we will be able to identify the pattern in the current one.
The way out can be found through recalculation of bars with a shift of the beginning on smaller TFs, then we create several charts and the necessary pattern (if it is there at all) will appear on some of them, then we will be able to identify the pattern on the current one.
I try to find new ideas how to add new patterns (sets) or remove them from the analysis, while in this thread there were ideas how to solve this problem in one direction and with another:
Kos CandleCode
Integer to draw a horizontal grid and code by bar price position in the grid. Encode by three levels, by four, by five, etc., thus adjusting the total number of variants and accuracy.
If you need candlestick patterns, check out my profile.
It's all been stolen before you)
More thoughts.
Position 0 - second bar completely below the first.
Position 1 - all prices of the second bar are below the first bar, and the high is above the low and below the body (within the lower shadow).
Position 2 - all prices of the second bar are below the first bar and the high enters the body of the first bar.
Position 3 - all prices of the second bar are below the first bar and the high enters the upper shadow of the first bar.
Position 4 - all prices of the second bar are below the first bar and the high is above the high of the first bar.
Now the low and the bottom of the body are below the first bar, so move the top of the body, and the high. And so on and so on and so on.
We should consider how to deal with cases where the opening equals the closing of the first bar and when there are no shadows.
But this is a trifle, it will only take some effort.
1. <Low
2. >=Low and <Min(O,C).
3. >=Min(O,C) and <=Max(O,C)
4. >=Max(O,C) and <=High
5. >High
I understand it all, I'm trying to find fresh ideas on how to quickly add patterns or remove them from analysis, while in this thread there were ideas on how to solve the problem head-on, and with help:
Kos CandleCode
Integer to draw a horizontal grid and code by bar price position in the grid. Encode by three levels, by four, by five, etc., thus adjusting the total number of variants and accuracy.
To do this you need to break down the concept of a pattern into basic bricks, what does it consist of?
I suggested above the terminology of an attack a correction a pullback,
For example: an attack is a primary movement in a pattern (may be complex or simple, composed of one or more bars),
A correction differs from a pullback by the length of counter-movement relative to an attack, up to half of it is a correction, more than half is a pullback.
This is all for example :)
If you have basic patterns, you can both code them and quickly change them (for example, you change the distinction between a correction and a pullback, you get other patterns).