Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Open+Close is not the size of the body. High+ (Low/3) is not the size of the size of tail.
Body size is Close - Open only for bullish candles.Please try to use SRC button when posting code; it makes it a lot easier to read (I've modified your post above).
Firstly, you are using doubles (numbers) to store something that should really be boolean (true/false), no?
Take a look here for a good guide about doing lookbacks correctly.
The easier approach (in my opinion) is to have distinct function calls for your patterns.
An example using the new format:
Finally, I'll just point out that you are reinventing the wheel. There are plenty of these pattern-finding indicators already available.
If you're doing it as an exercise to learn, that is great! But I just thought I'd point it out in case you didn't know.
Good luck!