Manual for the indicator "Gartley Hunter Multi"

30 October 2023, 13:42
Siarhei Vashchylka
0
211

The "Gartley Hunter multi" indicator is designed to search for and display harmonic trading patterns or Gartley patterns on the chart. The search for patterns is carried out automatically on dozens of instruments and on eight standard timeframes (m1, m5, m15, m30, H1, H4, D1, Wk, Mn).

It has an advanced system of alerts and push notifications. As soon as a pattern appears on some instrument and time frame, the indicator will immediately notify you about it. You can install it on a VPS to receive signals on your mobile phone.

Disclaimer:

  • The indicator works only on Windows. The indicator will not work properly on a Mac.
  • The indicator is available for the fourth and fifth versions of the trading terminal:

Harmonic Trading: Available Patterns

Currently the following patterns are implemented in the indicator. In the future, the list will definitely be replenished.
    • Gartley
    • Butterfly
    • Shark
    • Crab
    • Bat
    • Alternate bat
    • Cypher
    • Deep crab

"Zigzag" indicator

The "Gartley Hunter Multi" indicator is based on the "Zigzag" indicator. The essence of this indicator (Zigzag) is to connect extreme points (maximum and minimum points on the chart). This happens according to a certain formula, which is based on one key parameter: “Depth”. 

Without going into details, we can say that this parameter is responsible for the magnitude or size of extrema. The larger this parameter, the larger and more significant extrema it connects. In the picture below you can see the difference between depth parameters 12 and 25.


Logic of the "Gartley Hunter Multi" indicator. Pattern sizes

The "Gartley Hunter" indicator takes segments constructed using the "Zigzag" indicator and uses it to search for and construct harmonic patterns. For these purposes, we have introduced a minimum and maximum depth parameter, which can be changed in the external parameters of the indicator:

    • "minDepthscan " is responsible for the smallest harmonic patterns. The default value is 5.
    • "maxDepthscan" is responsible for the largest harmonic patterns. The default value is 30.

These settings are optimal, but you can change it if you wish. For example, if you don't want to use the smallest harmonic models, then you can increase the minimum depth parameter ("minDepthscan ") to 10.

The picture below shows examples of small patterns with a depth of 5.

And here we have medium patterns with a depth of 10.

Logic of the "Gartley Hunter multi" indicator. Scan step

Let's study a new important parameter - "Scan step". This parameter is responsible for the step within which the indicator will move from the smallest to the largest indicator depth parameter. By default, 'scan step' = 5.

For example, to scan the depth range from "minDepthscan " = 5 to "maxDepthscan " = 30, the indicator needs to perform 6 scans: 5,10,15,20,25,30. At each of the scanned depth levels, the indicator can find a harmonic pattern. This means that several patterns may appear on the chart at once - large and small.

If we, for example, change the "scan step" to 1, then it will be more thorough: 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30. Thus, the indicator will perform 26 scans instead of 6. A more thorough scan loads the computer more, but allows you to find absolutely all possible harmonic patterns. However, there is no particular need for it. Most of the patterns can be found with "scan step" = 5.

The "Scanning step" parameter can be changed in the external parameters of the indicator. The "DepthStepScan" parameter is responsible for this. It is not recommended to change this parameter. You can only do this if you have a very powerful computer.

Pattern table

The main task of "Gartley Hunter Multi" is to look for patterns in all possible markets and all possible timeframes. To implement this idea, we made a table that contains information on all found patterns. The picture below schematically shows its (table) structure:


Instruments

You can use any instrunents that the broker allows. For example, these could be currency pairs, stocks, indices, metals, oil and gas, cryptocurrency, and so on. In order to customize the list of displayed instruments, go to the external parameters of the indicator and double-click on the field with a list of instruments opposite "Symbols".

After double-clicking, the field with the tools will become active and you can enter the ones you need. Please note that it must be written separated by commas and exactly as it is indicated in your broker’s market watch.

Timeframes

The indicator contains only classic timeframes: m1, m5, m15, m30, H1, H4, D1, Wk, Mn. All of it can be turned on and off in the external parameters of the indicator. See example below:


Patterns

All found patterns fall into the cells of the indicator table. Sell patterns are displayed with red squares, and buy patterns are displayed with green squares. To the right of the pattern name is its age in bars or candles. When you click on a pattern, the instrument we need on the timeframe we need opens on the chart above the table. Below you can see how this function works in the MT4 and MT5 versions.

Metatrader4

Metatrader5

Transition speed

Please note that with basic settings, when switching from pattern to pattern in both versions of the terminal, it takes about 1 second. Basic settings assume the following timeframes: m30, H1, H4, D1, Wk, Mn. When adding smaller timeframes, such as m1, m5, m15, the transition speed may decrease, and the transition itself will take an average of 3-4 seconds.

Manual scanning

In a situation where most of the markets are closed (for example, on the weekend), automatic scanning, which usually works by default, will not work. You can scan charts manually by clicking on the “S” button located in the upper left part of the indicator panel.

Scrolling a table

In different versions of the terminal, scrolling the table is done differently.

In the version for MT5, the indicator works in the most convenient way - scrolling is done using the mouse wheel:

In the version for MT4, scrolling is done manually by dragging the slider on the right with the mouse.

First launch of the indicator

Before launching the indicator, make sure that there is enough free space on the disk where you have installed the trading terminal. A minimum of 20 gigabytes is required. This is due to the fact that the indicator needs quotes to search for patterns. For example, if the indicator analyzes 20 instruments on 8 standard timeframes, then it requires quotes from 240 charts per unit of time. And it take up free space.

I also draw your attention to the fact that the smaller the analyzed timeframe is, the more quotes it requires. Therefore, by abandoning the m1, m5 and m15 timeframes, you will significantly reduce the costs of the indicator. These quotes take up most of the free space. The indicator will work faster and will download less information.

Also, when the indicator is launched for the first time, rectangles with patterns in the table may blink. This is explained by the fact that the indicator tries to find patterns on charts whose quotes are in the process of downloading. As soon as this process is completed, the table will stop blinking and the indicator will return to normal.

Stop Loss and Take Profit levels

To the right of each pattern you can see vertical rectangular areas that are responsible for the Stop Loss and Take Profit zones. These are the average values of stops and profits that are triggered most often. Take Profit levels are taken from Scott Cairney's book "Harmonic Trading". Stop Loss levels are determined empirically and are calculated based on the Fibonacci grid, which is built based on the size of the pattern.

Alert system. Description

We have implemented a system of Alerts and Push notifications in the indicator. Alerts are activated by pressing the "A" button on the indicator panel. Push notifications are enabled in the external parameters of the indicator. "UsePushWithAlert" parameter.

When a pattern appears on the price chart, the indicator will notify you about it. It will provide the following information:

  • Pattern name
  • Pattern direction
  • The instrument on which the pattern appeared
  • Timeframe on which the pattern appeared
  • Depth (pattern size)
  • Pattern age
  • Stop Loss level value
  • Take Profit 1 level value
  • Take Profit 2 level value

Alert system. First activation

The first time you press the “A” button, the indicator will notify you of all possible patterns that currently exist on the instruments it analyzes. You will see approximately the same thing as shown in the picture above. After this, the indicator will remember all these patterns and you will no longer receive repeated alerts for them. All further alerts will appear gradually at the time of their formation.

Redrawing patterns. Several levels of confirmation

The indicator does not redraw patterns. It forms it exactly in those zones in which it is provided for by the harmonic trading system. At the same time, there are some cases in which an inexperienced user may mistake what is happening on the chart for redrawing. Let's look at it.

1. A little theory

If you are familiar with the Harmonic Trading system, you know that the final precise pattern formation is point D. It is built using several Fibonacci grids at once, but the key measurement is the ratio of A-B-C-D or A-D to X-A.

Let's look at the example of the "Gartley" pattern below. Its formation point is determined by the 78.6 Fibonacci level (X-D). Otherwise, A-B-C-D = XA * 0.786. Accordingly, this pattern simply cannot be redrawn because it is not given the framework of the system. That means it simply has nowhere to go. A single final point of formation is present in 9 patterns out of 12. That means 9 of 12 patterns are not redrawn.


2. Patterns "Butterfly" and "Shark"

There are three patterns that have several possible levels of formation. For example, if we look at the left side of the picture below, we will find that the Butterfly pattern can be formed from both the 1.272 level and the 1.41 level. This means that price can reverse from each of these levels, which means we have 2 potential reversal patterns, not just one. Accordingly, if one of the levels, for example 1.272, is broken, the indicator will redraw the pattern at 1.41 if it is confirmed. This logic is embedded in the harmonic trading system.


Redrawing patterns. Horizontal offset

It is also worth analyzing the situation where the right wing of the pattern can shift horizontally. This can happen when the price does not make sudden movements in any direction, but continues to be within the target zone of the pattern.

1. A little theory

The final point of pattern formation is determined when the price closes above (for buy) and below (for sell) the key Fibonacci level. In the example below, pay attention to the “Butterfly” pattern, which showed its first level of pattern development. The key point here is to break the 127.2 level and close the price above this level.


Now imagine a situation in which the second candle after the signal (point D) would break through the low formed by point D of the pattern and return again, closing above the level of 127.2. In such a situation, the conditions of the pattern would also be met, because the closure would again occur above the level of 127.2. But at the same time, we would get a lower low level, and the right wing of the pattern would move two candles to the right and slightly lower.


The figure above describes this hypothetical situation. In fact, the pattern moved a little lower, but at the same time all the conditions for its formation remained fulfilled. In fact, this can also be called redrawing, but it again fits into the rules of the classical system of Harmonic trading, since the conditions for pattern formation are met at both point 1 and point 2.

Admittances

To understand what admittances are, you first need to understand the principle of forming an ideal Gartley pattern.

An ideal pattern implies an ideal ratio of all segments along Fibonacci levels, where each segment, upon closing, complied with the rules of the level's formation.

  • Formation of the upper Fibo level is a situation where the price approaches the level from bottom to top, touches it, and then closes below the level.
  • Formation of the lower Fibo level is a situation where the price approaches the level from top to bottom, touches it, and then closes above the level.

If these conditions are met for each segment of the pattern, the pattern is considered ideal. But imagine for a moment the following situation:

On the daily chart, a “Gartley” pattern is formed, which perfectly formed all three segments: AB to XA, BC to AB and CD to BC. But the final segment (AD to XA) did not reach the target level of 78.6 by a couple of points, which does not play any role for the daily chart (we are talking about a couple of points).

Question: Should this pattern be considered confirmed or not? After all, the conditions were not met - the level was not touched. A person in such a situation will conclude that the pattern has been formed, but for the robot the conditions will not be met and it will not draw the pattern.

For such situations, we introduced an admittances system that is responsible for two aspects:

Candle shadow admittances - The percentage of possible failure of the candle shadow to reach the target level. Parameter "ExtUncertaintyShadow" = 30. It's calculated based on the distance from the target level to the previous one. Using the "Gartley" pattern as an example, the target level is 78.6%, and the previous one is 61.8%. The distance between levels is taken as 100%. The "ExtUncertaintyShadow" parameter = 30 means that the pattern will be displayed if the shadow of the candle goes into the upper (for sell level) or lower ( for buy level ) 30% of the range of levels 61.8% and 78.6%.


The picture above shows this logic schematically. We see that the price did not reach the target level just a little, but at the same time fell into the admittances zone. Under such conditions, the pattern will be displayed by the indicator.

Candle body admittances - The percentage of the candle body that can go beyond the target level. Parameter "ExtUncertaintyHead" = 30. It is calculated based on the distance from the target level to the next one. Using the "Butterfly" pattern as an example, the target level is 127.2%, and the next one is 141%. The distance between levels is taken as 100%. The parameter "ExtUncertaintyHead" = 30 means that the pattern will be displayed if the body of the candle enters the upper (for buy level) or lower (for a sell level) 30% of the range of levels 127.2 and 141.


In the picture above we see that the closing price of the candle slightly exceeded the level 127.2 we needed, falling within the acceptable admittances level of 30%. In such a situation, the pattern will be displayed.

If desired, the value of both types of admittances can be set to 0%, which will imply drawing only ideal patterns. But, as practice shows, admittances are necessary, since completely ideal patterns appear extremely rarely.

You can test different admittances values, which can range from 0% to 45%, and see how accurately the harmonic models perform. According to our experience, an admittances value of 30% for shadows and for bodies is optimal.

Disappearance of patterns

The harmonic pattern will remain on the chart as long as the conditions for its formation are met (stopping and closing the candle within the Fibonacci zone). If after the formation of the pattern the price moves in the direction we need, the pattern will remain on the chart.

If the pattern did not live up to expectations and after its appearance the price went in the opposite direction, the pattern will disappear, since the conditions for its formation will no longer be met (the price passed the Fibonacci zone required by the conditions of the pattern and closed above or below it).

But, as practice shows, patterns that appear, but are then canceled, can also turn the market around and go into profit without breaking through the Stop Loss zone (this zone exists for these purposes). Therefore, if the pattern was confirmed and you opened an order, after which the pattern disappeared (since its conditions are no longer met), do not rush to close an order until the Stop Loss is triggered.

In the example below you can see a similar situation:

This example was taken from the strategy tester - therefore, the pattern after the breakdown of the minimum was saved. On a real chart, when you change the time frame, the pattern will disappear because the indicator will scan the chart again and this time the conditions for the formation of the pattern will not be met.

External parameters

  • Symbols - Selection of instruments for analysis
  • depthStepScan - Pattern scanning step
  • minDepthScan - Start of scan range
  • maxDepthScan - End of scan range
  • uncertaintyHeadScan - Percentage of error for the body of the pattern's target candle
  • uncertaintyShadowScan - Percentage of error for the shadow of the pattern's target candle
  • usePushWithAlert - Whether or not to use push notifications with an alert
  • MaxBarAge - The maximum age of the pattern displayed in the table
  • MaxBarAgeScan - The maximum number of bars within which patterns are searched
  • Timeframes - Selection of time frames displayed on the panel
  • Patterns - Selection of patterns tracked by the indicator
  • X_A_B_C_D_color - Color of letters X-A-B-C-D
  • color_bullish_pattern_name - Name color for bullish patterns
  • color_bullish_lines - Line color for bullish patterns
  • color_bullish_triangle - Triangle color for bullish patterns
  • color_bullish_fibo - Color of fibo levels for bullish patterns
  • color_bearish_pattern_name - Name color for bearish patterns
  • color_bearish_lines - Line color for bearish patterns
  • color_bearish_triangle - Triangle color for bearish patterns
  • color_bearish_fibo - Color of fibo levels for bearish patterns
  • SL_color - Stop zone color
  • colorTakeProfitOne - Color of the first take profit zone
  • colorTakeProfitTwo - Color of the second take profit zone
  • Author: Siarhei Vashchylka. For any questions, write to me in private messages. I also recommend subscribing to my updates. To do this, follow the link to my profile and click "Add to friends".


    Share it with friends: