Fractal code editting

 

Everyone

Hello

Here it is my question to you: 

How to modify the Fractal indicator code (I mean the conventional Bill Williams Fractals) in order to it omits the 2nd fractal of 2 consecutive identical fractals.

Task: Omit 2nd fractal if 2 consecutive identical fractals is calculated.

I appreciate any contribution in advance

Bests

Ali

Fractals - Bill Williams' Indicators - Technical Indicators - Price Charts, Technical and Fundamental Analysis - MetaTrader 5 Help
  • www.metatrader5.com
All markets are characterized by the fact that on the most part the prices do not change too much, and only short periods of time (15–30 percent)...
 
Your topic has been moved to the section: Technical Indicators
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 

It's ok

Thank you

 
Alireza Davari: How to modify the Fractal indicator code
  1. You edit the code and compile it.

  2. You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
              No free help (2017)

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

    We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
              No free help (2017)

 
William Roeder #:
  1. You edit the code and compile it.

  2. You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
              No free help (2017)

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

    We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
              No free help (2017)

thanks
 
Alireza Davari:
Task: Omit 2nd fractal if 2 consecutive identical fractals is calculated.


use↓

if(dCurrent>=High[i+1] && dCurrent>=High[i+2] && dCurrent>High[i-1] && dCurrent>High[i-2])

instead of this↓

if(dCurrent>=High[i+1] && dCurrent>=High[i+2] && dCurrent>=High[i-1] && dCurrent>=High[i-2])