MT5 indicators← Break Swing ZigZag product page日本語の取扱説明書

This product is in preparation for release. Product files are not yet distributed; the manual is published so that you can review its content. This manual is an English translation of the Japanese manual. Images (screens and figures) are not translated and may contain Japanese text or earlier names.

For Trilogy users

Break Swing ZigZag

It decides the swing direction from the direction in which price breaks the high or low of the previous Length bars, and shows the extreme of the previous swing on the reversal bar. The horizontal position of the arrow is the bar on which the reversal was confirmed, not the bar that made the extreme.

Indicator name: Break Swing ZigZagMetaTrader 5Price chart

High/low break → direction reverses → vertex shown on the confirming bar

Held top priceLowest low of the previous Length barsBreaks belowTop mark on the reversal bar
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Blue lineConnects confirmed vertices. It is not a line that follows forming candidates.

2

Red and green arrowsRed is the top of a finished upward swing, and green the bottom of a finished downward swing.

3

Horizontal position and heightThe horizontal position is the reversal bar, and the height is the confirmed vertex price. It is not necessarily the high or low of that bar.

Equal values are not a breakShown on the confirming barA bar that breaks both sides reverses
1

MT5 display and examples of changed settings

Compares the default settings and a settings change example on a screen with only this product applied.

Settings change example: these items are changed
Number of past bars to compare / Length (bars, 1 to 500)
InpLength
6 → 12

All other inputs remain at their defaults. On a PC, the default is on the left and the change example on the right; at smartphone width they appear in the same order from top to bottom.

Default settingsInpLength = 6
Break Swing ZigZag default settings
Default Length 6, Closed Bars Only true. The blue line connects turning points, with red showing tops and green showing bottoms. Some arrows are near the top and bottom edges.
View the screen in detail at full size
Break Swing ZigZag default settings (full size)
Settings change exampleInpLength = 12
Break Swing ZigZag settings change example
An example where only Length is changed to 12. In this display range there are fewer points, and some positions have also changed. It does not mean that the number of points is always halved or that points are always delayed by a fixed number of bars.
View the screen in detail at full size
Break Swing ZigZag settings change example (full size)

Example shown: M1. This is an example for explaining the display. The published images are screens from before the brand display was added. The calculation and drawing conditions are the same, and the packaged version has display settings for the brand text and the QR code. The settings change example is not a recommended value. Details can be checked in the full-size view. Please also check the price scale of the main chart and the positions of the candlesticks.

2

How to read it in 30 seconds

Conditions for a change of direction

If price is higher than the highest high of the past Length bars, the direction becomes up; if lower than the lowest low, down. If both, the current direction is reversed.

Conditions for drawing a point

A vertex is drawn only when a direction already exists and it reverses. Deciding the direction for the first time does not draw a point.

How to read the display

Read it as a record of the time at which the reversal could be confirmed, not as the position of the past high or low.

3

What it measures

An indicator that switches state on a bar that breaks out of a price range. It does not filter reversals by the size of the range or the retracement ratio.

Comparison window

Length is the number of preceding bars, excluding the target bar. With the default 6, the bar is compared with the highest high and lowest low of the previous 6 bars.

Strict break

A high that only equals the highest high of the window, or a low that only equals the lowest low, does not meet the reversal condition.

Swing extremes

In an up direction, the high is kept and updated; in a down direction, the low. Continued breaks in the same direction alone do not draw a new vertex.

When both sides are broken

If the same bar breaks both the high and the low of the previous Length bars, the current direction is reversed. It is not decided by the color of a bullish or bearish candle.

Price at reversal

Normally the held extreme is shown. When the direction reverses on a bar that breaks both sides, the more extreme of the held extreme and the reversal bar's high or low is used.

What it does not measure

It does not predict future reversals or trading results. A point being shown and being able to trade at that price are separate matters.

4

Situations for reading the display

A red top mark appeared

Indicator
On the bar with the red arrow, the direction changed from up to down.
Cross-check
Cross-check the lows of the previous Length bars with the low of that bar.
Check
Check the horizontal position as the reversal time and the height as the held top price.
Caution
The top price may be the price of an earlier bar, and it does not show the selling price at that time.

A green bottom mark appeared

Indicator
On the bar with the green arrow, the direction changed from down to up.
Cross-check
Cross-check the highs of the previous Length bars with the high of that bar.
Check
Separate the time at which the bottom price could be confirmed from the time when that price was actually reached.
Caution
The green mark does not guarantee a future rise.

A large bar broke both sides

Indicator
Look at both the high and the low of that bar.
Cross-check
Check whether it strictly broke both the high and the low of the window.
Check
If there was an earlier direction, check the rule that switches it to the opposite direction.
Caution
It does not judge by the direction of the close or by bullish/bearish candles alone. If there is no direction yet, nothing is confirmed.

The high stopped at an equal value

Indicator
Compare the highest high of the window with the high of the target bar.
Cross-check
Distinguish whether it is only equal or actually higher.
Check
An equal value is not counted as an upward break. The same applies to the low side.
Caution
Even if the values look equal in the rounded display on screen, the internal prices may differ.

Try changing Length

Indicator
Change only Length on another chart with the same history.
Cross-check
Compare the number and positions of points and the connecting lines.
Check
Check that changing the comparison range changes the sequence of states itself.
Caution
The change example is not a recommended value. A longer setting does not necessarily simply delay all points.
5

Steps for checking the display

1

Start with the defaults

Check Length 6, Closed Bars Only true.

2

Separate price and time

Check the height of the red and green arrows and the bar at their horizontal position.

3

Check which side was broken

Look at the previous Length bars excluding the target bar, and check which condition applies: up, down or both sides.

4

Compare on another chart

When making changes, change Length 1 item at a time. Keep the history range and other conditions the same.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Break_Swing_ZigZag.ex5The MT5 main file. Place it in MQL5/Indicators.

The ZIP contains only 1 item, the main file. The manual is opened from the product page on the site. Source code is not included. MT5 only; registration, account authentication and placing a license file are not required. Use it without changing the file name.

1

Extract the ZIP

Extract the ex5 main file rather than leaving it in the compressed file.

2

Open the data folder

In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.

3

Apply this product

Refresh the Navigator or restart MT5, and apply it to the target chart. When comparing different settings, using separate charts makes checking easier.

4

Check the settings and display

First check with the default values. Changes and removal are done from the chart's 'Indicators List'.

Using this product does not require allowing DLLs. When removed, this product's drawings are cleared.

7

Settings

There are 6 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.

Number of past bars compared

English item name
Length (bars, 1 to 500)
Input name
InpLength
Default
6
Allowed range
Integer 1 to 500
Description
The bar is compared with the highest high and lowest low of the previous Length bars, excluding the target bar. Default 6. The calculation is initialized on the bar after Length bars from the start, and breaks are checked from the next bar. Right after initialization, a vertex may not appear.

Use closed bars only

English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
With true, reversals are not judged on the forming latest bar. With false, the latest bar is included, and that bar's points, arrows and connecting lines appear and disappear until the bar closes.

Brand display and QR

English item name
Show Trilogy brand and QR code
Input name
InpTriBrandShow
Default
true
Allowed range
true / false
Description
Switches the brand text and QR display on or off.

Brand display position

English item name
Brand position (chart corner)
Input name
InpTriBrandCorner
Default
Bottom left
Allowed range
Top left / Bottom left / Bottom right / Top right
Description
Choose from the four corners of the chart.

Brand horizontal offset

English item name
Brand horizontal offset (pixels)
Input name
InpTriBrandX
Default
10
Allowed range
Integer. Limited to 0 to 4000
Description
Adjusts the horizontal margin from the specified corner in pixels.

Brand vertical offset

English item name
Brand vertical offset (pixels)
Input name
InpTriBrandY
Default
10
Allowed range
Integer. Limited to 0 to 4000
Description
Adjusts the vertical margin from the specified corner in pixels.
8

Usage specifications

Confirmed dots and lines added later

When closed bars are added with the same history and settings, confirmed dots are not moved to past bars. When a new dot is confirmed, a segment from the previous dot is added. Do not read the whole segment as having been visible from earlier.

Scope changed by recalculation

Recalculates on input changes, additional loading or correction of history, and changes of the start position. In those cases, the past display is not guaranteed to be the same.

No price-range filter

There is no price-range filter such as retracement ratio, Deviation or ATR. Length is a number of bars, not points or a ratio.

Dots output on 1 bar

Only 1 next direction is decided on 1 bar. Even when both sides are broken, it does not output 2 marks, a top and a bottom, at the same time.

For on-screen display only

The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.

9

Troubleshooting and usage notes

There is no line yet

Check that there are enough history bars. The first direction decision alone does not draw a point, and a line needs several vertices.

The arrow is away from the bar

By specification, the candidate extreme price is drawn on the reversal bar. It is not always aligned with the high or low of the reversal bar itself.

No mark on the last bar

Closed Bars Only true does not process the latest forming bar. Also, no vertex appears on a bar where the direction does not change.

Marks reach the edge of the screen

Adjust the price scale and display range. The published images can also be checked at full size.

Inputs are not accepted

Length is an integer from 1 to 500. Out-of-range values cause loading to be refused at initialization.

If the first display does not appear, check history loading and the input ranges. If an earlier display has stopped updating, first check the price feed and the terminal's connection status.

10

Technical information and specification details

Check formula

With the target bar t and Length L, the comparison range is t−L to t−1. High[t] > highest high gives up, Low[t] < lowest low gives down. If only one side, that direction; if both sides, the existing direction is reversed; if neither, the direction is kept.

Handling at the start

No direction is assumed at the start. The high and low of bar L, counting the first bar as 0, are held as the initial extremes, and checks start from bar L+1. If only two-sided breaks continue before a direction is first set, neither a direction nor a vertex is decided. The high or low of this initialization bar may remain in the first extreme.

Vertex price

In a normal reversal from up to down, the held highest high is shown; from down to up, the lowest low. In a two-sided break, the high and low of the reversal bar are also compared. The delay until confirmation is not a fixed L bars. The output is DRAW_SECTION points and top/bottom arrows.

Scope of the published images

M1 in the published screens is the timeframe shown when the display example was created. The fixed data is mainly at 30-minute intervals, and the images do not show the frequency of appearance on actual 1-minute bars.

Scope of verification

The published images are screens from before the brand display was added. The on-screen display of the product with the brand display has not yet been verified.