if(i==ArrayMaximum(high,i-Frames,i+Frames))
It's a fractal when there are n on the left and n on the right lower than the middle. You check if the highest [middle … n on the right] equals the middle.
Perhaps you should read the manual. https://www.mql5.com/en/docs/array/arraymaximum
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.

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
I've coded Fractal Indicator with a adjustable input variable.
It looks working at first glance, but sometimes it doesn't display fractal sign when it should be there. ( Picture attached below)
Im new to this language and community.
I have no idea what causes this problem. If you teach me what is the problem and could be a solution, I will be very thankful to you.