if you wish to code one thing, you at all times search for choices corresponding to ZigZag, Fractals, Shifting common and different methods to seek out peak and troughs so you may make issues a bit of bit straightforward.
However they is probably not the very best correct options in your patterns
Since extra superior methods of buying and selling are already found and shared over web that are utilized by banks, you might have to rethink the logic for coding peaks and troughs since they’re crucial. There are a lot of looking out algorithms corresponding to Directional, Sequentional, Random, Weightage based mostly and others.
I noticed some Hamonic patterns mql5 code, they’re all good however the logic to plot them is probably not correct and in the event you nonetheless use it could deliver failure to your trades.
The logic behind it’s that there are completely different search algorithms and to make a successful technique you must at all times take into consideration customized options which aren’t but developed.
MQL is finest language to output alerts out of your mind to MetaEditor ensuing as a purposeful program.
The foremost drawback I keep away from utilizing ZigZag for my base is that you simply cant make certain concerning the ExtDepth and ExtDeviations till you analysis on that. So to unravel this drawback, a dealer could method one other options corresponding to growing different customized based mostly looking out algorithm for plotting patterns corresponding to harmonics.
They’re largely value motion based mostly.
I keep away from utilizing Fractals too as a result of it’s not a transparent approach to characterize a value exercise.
Screenshot of some superior ideas which deal with Mitigated and unmitigated approach to plot harmonics