
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
Make two parameters. One for human - string, second for machine - int. The third variable is for type selection. In any case, when indicator starts, print second option of combination's coding. If consequence is set to 100, then print additional information - from how many to how many can change parameter int.
For a candlestick with equal opening and closing we can assume that it has the direction of the nearest candlestick with unequal opening and closing. If one candlestick is coded with three numbers, 0- for equal opening and closing, then there will be too many rare sequences.
The optimizer needs two parameters to run: the combination length and the counter. Suppose our combination length is 4, then 2^4 = 16. It means that the counter should be from 0 to 15. Going through it in the optimizer we will get all combinations of 4-digit patterns.
In order not to confuse the user, you must add ENUM_PATTERN_TYPE structure, which sets pattern type: numeric or string. If you select a string pattern, do not use counters and length of combinations. And vice versa, if you want to run in the optimizer, select the numeric pattern type.
I've seen something like this before, it's searchable on Yandex for "candlecode"
The optimizer needs two parameters to run: the combination length and the counter. Suppose our combination length is 4, then 2^4 = 16. It means that the counter should be from 0 to 15. Going through it in the optimizer we will get all combinations of 4-digit patterns.
In order not to confuse the user, you must add the ENUM_PATTERN_TYPE structure, which defines pattern type: numeric or string. If you select a string pattern, do not use counters and length of combinations. And vice versa, if we want to run in the optimizer, we select the numeric pattern type.
I have added the ENUM_PATTERN_TYPE structure, while I suggest to hide the "int" type parameter which defines the type of candlestick combination from the user:
but leave only these parameters:
I don't quite get it - are these programmers or suckers?
Why translate something into something?
If we need a code 101 - that's the normal value of 5. That's it. What's the problem? Translate mentally the decimal into binary?
I made similar experiments, only my candle had four more sizes - from small to large. That makes eight different candle sizes. And, consequently, three bits. In the pattern we write the number (ulong) - the grid is bigger than for a twenty-bar pattern.
The problem is, in my opinion, far-fetched.
I don't quite get it - are these programmers or suckers?
Why translate something into something?
If we need a code 101 - that's the normal value of 5. That's it. What's the problem? Translate mentally the decimal into binary?
I made similar experiments, only my candle had four more sizes - from small to large. That makes eight different candle sizes. And, consequently, three bits. In the pattern we write the number (ulong) - the grid is bigger than for a twenty-bar pattern.
The problem is, in my opinion, far-fetched.
Normal users cannot mentally convert decimal to binary :)
I don't quite get it - are these programmers or suckers?
Why translate something into something?
If we need a code 101 - that's the normal value of 5. That's it. What's the problem? Translate mentally from decimal to binary?
I made similar experiments, only my candle had four more sizes - from small to large. That makes eight different candle sizes. And, consequently, three bits. In the pattern we write the number (ulong) - the grid is bigger than for a twenty-bar pattern.
The problem is, in my opinion, far-fetched.
The program will be used by a regular user, not a programmer (it's been already mentioned above and more than once) - and for him "101" and "5" are two different numbers, while for him "5" doesn't contain any information about the relative position of the candles, but "101" clearly says "bullish, bearish, bullish".
How do you code the dodge?
For example the "evening star" pattern can be bullish-dodge (or wolf or pin bar)-bear. If you ignore the dodge (wolf or pin bar) then the pattern is not correctly identified. I think 1 bit for coding a candle will not be enough 2 bits per 1 candle.
For example the bull candle is 01, the bear candle is 10 and the other candles are 11. Then, 'evening star' would be 01 11 10, 'morning star' would be 10 11 01.
....
I was also thinking. How to code a takeover pattern? A simple bullish-bearish combination does not tell us anything, but a bullish-big bearish combination already tells us about a bullish-bearish takeover. Or alternatively we could sum these two candlesticks into one and get a pin bar and code this summed candlestick as 11.
How do you code the dodge?
For example the "evening star" pattern can be bullish-dodge (or wolf or pin bar)-bear. If you ignore the dodge (wolf or pin bar) then the pattern is not correctly identified. I think 1 bit for coding a candle will not be enough 2 bits per 1 candle.
For example the bull candle is 01, the bear candle is 10 and the other candles are 11. Then "evening star" will be 01 11 10, "morning star" will be 10 11 01
The shadows are not coded in any way (at least at this stage). Maybe later ...
The shadows are not coded in any way (at least at this stage). Perhaps later...
We should consider everything at once to avoid re-doing it later.
....
Again, if we return to the "Evening Star" pattern, it can be seen as a bullish-small candle-bearish and a bullish-bearish takeover. It means that we have a composite pattern consisting of a bullish candle and a bearish absorption. And if we sum up all three candlesticks from the pattern, we get a pin bar again.