Candlestick analysis. Pattern coding

 
 
VOLDEMAR:

Your Kungfu is stronger than mine (C)

could you decipher the logic

Compiler blames....

try it like this:

#property script_show_inputs
//--- input parameters
input ENUM_TIMEFRAMES timeframe = PERIOD_H1;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart(){
Print(timeframe, " = ", PeriodToString(timeframe));
}
//+------------------------------------------------------------------+
string PeriodToString(ENUM_TIMEFRAMES tf){
return(bool(0xC000 & tf) ?(0xC001 == tf ? "MN1":(0x8001 == tf ?"W1":("H" + IntegerToString(tf&0x1F)))) : "M" + IntegerToString(tf&0x1F));
}
denkir:

I suggest the first task for the contest is "implementation of a trade request".

the problem is complex - there are ready-made classes, there are old codes from mq4 and everything has been discussed 1000 times and there is no solution that everyone would use

I would suggest to find a method for coding candlesticks - Japanese candlesticks, patterns and price action etc... not recognition, but just a method to code combinations of 2 or 3 bars - mql5 now has classes and enumerations and... would like a flexible coding structure or method

 
IgorM, you posted an untested and unworkable code ))))
 
IgorM:

Try it like this:

the problem is complex - there are ready-made classes, there are old codes from mq4 and everything has been discussed 1000 times and there is no solution that everyone would use

I would suggest to find a method for coding candlesticks - Japanese candlesticks, patterns and price action etc... not recognition, but just a method to code combinations of 2 or 3 bars - mql5 now has classes and enumerations and... would like a flexible structure or coding method

Been doing a few different coding methods. Seen coding from others.
 
denkir:
IgorM, you posted an untested and unworkable code ))))

Yes, it is - but it's not so much the code as one of the ideas of working with ENUM_TIMEFRAMES

HH: Please note that I don't work as a freelancer and don't consider myself a professional programmer - I can program, but as a trained amateur

Vinin:
Have done several different ways of coding. Seen coding from others.
I think it's a topical issue with the possibility to use all the power of mql5, I can do such a job according to TOR, but it's not everyone who can do some know-how, and new ideas often appear when discussing it collectively
 

here for example ( red Open > Close bar):

1. 2. 3. 4. 5.

how to effectively code this "stuff"?

 
IgorM:

here for example ( red Open > Close bar):

1. 2. 3. 4. 5.

how do I effectively code this kind of "shit"?

The conditions are not enough... what do you need in the end?
 

IgorM:

how to effectively code this "stuff"?

Look for the CandleCode technology on the Internet, maybe it is what you are looking for. The meaning of the coding is that the weight (code) of the candle is formed on the basis of the size of the linear parameters of the candle - the size of the body, the size of the shadows and the type of candle(bullish, bearish, doji).
 
denkir:
Conditions are not enough... what do you need in the end?

The output should have the type of combination, ie served at the input of f-forces (class) 2 bars got the answer number (or an enum value?) = 1 or 2 or 4 or NULL , served at the input 3 bars --> got 3 or 5 or NULL , let this task will be specifically for my 5 combinations, but

i am interested in the flexibility of the method of coding reciprocal bar locations

SZY: to me like that such problems can be worth a good prize fund, and once again to occupy programmers with problems who can without if or swith to realize old f-functions have no practical application

Kos:
Look for candle coding technology (CandleCode) on the internet, maybe that's what you're looking for. The meaning of the coding is that the weight (code) of the candle is formed on the basis of the size of the linear parameters of the candle - the size of the body, the size of the shadows and type of candle(bullish, bearish, doji).

i searched, i read and kodobase has some examples, but for me they are not universal (no flexibility)

https://www.mql5.com/ru/code/291

Мастер MQL5 - Класс для работы со свечными паттернами
Мастер MQL5 - Класс для работы со свечными паттернами
  • votes: 23
  • 2011.02.14
  • MetaQuotes Software Corp.
  • www.mql5.com
Класс CCandlePattern можно использовать при создании модулей торговых сигналов со свечными моделями для Мастера MQL5.
 

CandleCode is just a coding mechanism, which can be the basis of a kernel that searches for various candlestick patterns (classic patterns, PriceAction, etc.). 4 years ago I was developing such a kernel (just using this technology), maybe I will write an article about it in the future.

...

Sincerely Kos

 
IgorM:

for example (red bar Open > Close):

1. 2. 3. 4. 5.

how do I effectively code this kind of "shit"?

To begin with, you just need to code, then, increase efficiency.
Reason: