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)); }
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
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
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
Have done several different ways of coding. Seen coding from others.
here for example ( red Open > Close bar):
1. 2.
3.
4.
5.
how to effectively code this "stuff"?
here for example ( red Open > Close bar):
1. 2. 3. 4. 5.
how do I effectively code this kind of "shit"?
IgorM:
how to effectively code this "stuff"?
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
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)

- votes: 23
- 2011.02.14
- MetaQuotes Software Corp.
- www.mql5.com
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
for example (red bar Open > Close):
1. 2. 3. 4. 5.
how do I effectively code this kind of "shit"?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use