Harmonic Pattern Finder
This is a powerful addition to your MetaTrader 5 toolkit designed to optimize market analysis and performance. This technical indicator acts as a specialized analysis tool designed to visualize market data. It helps traders identify emerging trends, momentum shifts, and key support or resistance levels by plotting statistical calculations directly onto price charts.
How to Setup and Use Harmonic Pattern Finder
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
Description & Settings
Some highlights from this new one include:
Efforts to reduce the amount of screen clutter through adjustable means of selecting what should be displayed.
Double clicking any part of a pattern will now highlight it along with detailed analytical information like harmonic reversal ratios and temporal aspects.
Multiple zigzag selection has been dropped in favor of a single embedded one identical to the ATR ZigZag (). This means that no one should face installation issues as long as all files are placed in the same folder.
Collection of statistical information makes it possible to see how well a pattern has performed in the past.
The ratios for "anti-patterns" should now be correct.
So just go ahead and download it as its usage is pretty intuitive. It is recommended to use a black background or else you will need to set a visible color scheme in the indicator settings. For detailed technical information about the indicator continue reading after the image. For questions feel free to post in the forum or send a PM.
Double clicking a pattern makes it stand out from the rest (purple) and shows detailed statistics, timing and PRZ information that can be useful for evaluating a trade.
Screen clutter reduction
Apart from the interactivity features, one can in the settings choose if the indicator should:
Fill patterns visually or just show the line segments
Show pattern descriptions. Enabled by default which causes the specific names and points of a pattern to be drawn.
Show emerging patterns. This is enabled by default and shows the future projections necessary to anticipate a trade opportunity.
Show old patterns. This is enabled, but causes the indicator to draw already completed patterns – which strictly speaking is not always necessary.
Show "one-ahead" projections. Though disabled by default, enabling this option causes the indicator to become more responsive than the zigzag and projects patterns ahead of the current swing
Draw soft projections. This is a mode of visualizing projected patterns that is minimally cluttering using colors that blend in to the background scheme.
Show the comment box. This occupies the upper left of the chart and gives statistical information.
Pattern filtration engine
Different traders have different rules for determining whether or not a pattern is worth trading. Many theories exist, we shall not go through each of them here. The indicator adopts a "holistic" matching approach checking if each pattern ratio is within acceptable bounds set by a slack setting. However due to feedback from users, it is now possible to filter out patterns and projections where the potential reversal zone only consists of slack. A different, independent filtration method allows to filter out patterns that complete too early or too late based on measurements of the duration of the X-B segment compared to the B-D segment, or A-B to C-D for ABCD patterns.
Does this not suit your needs? Well if you know how to code then it is possible to write custom "filtration" rules, as explained below.
Statistical data
Based on the history of the current instrument, the indicator will remember which and how often a pattern fails or succeeds to reverse in the PRZ. This information can be gleaned in the comment box, which shows messages such as "F. Bear. New Cypher Prob. 60.00 (6 S / 4 F)". The first letter merely asserts whether or not the pattern has recently been clicked (F.), failed (O.), succeeded (P.), or tested the PRZ (T.). Next comes the direction and pattern name, before the statistical reversal chance is shown, in this case 60%. This is calculated from the history which has 6 successes and 4 failures of the pattern, shown if double clicking it. But by all means, keep in mind that past performance does not necessarily predict future results :)
Customizing the indicator
As stated, the indicator is extensively refactored and takes into account MQL5's object oriented features such as classes and interfaces. The indicator now consists of multiple files and has the architecture shown in the following UML diagram.
Do you want to create an EA? Well then you can implement an own "CHPFMatchProcessor", give it to the matching algorithm, and call it like the indicator currently does, which is to feed it the zigzag arrays and wait for responses. The matching algorithm will call the match-processor for each match found in the zigzag data, determining if a pattern is matched, overshot, or undershot (projected). This is what must be passed on to EA logic.
Need custom filtration or observation rules? A filtration would be to for example ignore patterns where the RSI isn't right or the XA segment is too straight. Then it should be as easy as writing an implementation of the "CHPFFilter" interface and plug it into the list of filters; the current time and purity filters are explanatory. An observation rule would for example be to send a push message or sound an alert whenever a pattern is matched. This can be accomplished in a similar way by implementing the "CHPFObserver" interface.
This indicator is a joint work between and
Updates
3.1: Corrected a syntax error for compatibility with MetaTrader build 1940 and above.
3.2: The tooltip on the line from X to D should now display the most relevant ratio for the specific pattern.