Fractals counter indicator

 

Hello,

can anyone code fractals indicator counter?
If lower fractal is lower then previous lower fractal then number is 2, if another lower fractal is lower then previous fractal then number is 3 and so on. If lower fractal is higher then previous lower fractal then number is 1 again.

It will be great if someone can add alert when there is lets say 3rd consecutive lower low fractal. :)
Have a look at the picture to see what I mean.

And same for upper fractals. It has to be higher than previous to increase number.

Thank you!

Files:
 
Kovactradercan anyone code fractals indicator counter? … It will be great if someone can…
  1. Yes, many people can.
         How To Ask Questions The Smart Way. (2004)
              Only ask questions with yes/no answers if you want “yes” or “no” as the answer.

  2. Slaves are great if you can find them.

  3. You have only four choices:

    1. Search for it (CodeBase or Market). Do you expect us to do your research for you?

    2. Try asking at:

    3. MT4: Learn to code it.
      MT5: Begin learning to code it.

      If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

    4. Or pay (Freelance) someone to code it. Top of every page is the link Freelance.
                Hiring to write script - General - MQL5 programming forum (2019)

    We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
              No free help (2017)