MT5 indicators← Channel Break 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

Channel Break ZigZag

Extends a sloped line connecting the start of the leg and its extreme, and confirms a turn on a bar that moves away from it by more than the specified width. The extreme-price mark is placed on the bar where it was judged, not on the past extreme's bar.

Indicator name: Channel Break ZigZagMetaTrader 5Price chart

Extend the upward line → drops beyond the width → peak confirmed

WidthExtension of the sloped line (schematic before the check)Confirmation bar beyond the widthMark height is the previous extreme
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Read the 2 linesOrange is the line on the leg's extreme side; purple is the line used to judge a reversal. When upward, purple is below; when downward, purple is above.

2

Judged on bars that make no new extremeWhile upward, updating the high takes priority. When the low of a bar that does not update drops strictly beyond the width from the extended line, a red peak mark appears. Downward is the reverse.

3

Separate the mark's height and horizontal positionThe mark's height is the previous leg's extreme, and its horizontal position is the confirmation bar. The blue ZigZag connects confirmation points and does not show a path along which one could have traded in the past.

Default width 0.3%Smoothing period 1 (no smoothing)Closed bars only by defaultMT5, no account authentication
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
Width method / Width Type
InpWidthType
Percent Of The Price → Points
Width in points / Width in Points (1 to 100000)
InpWidthPoints
1500 → 400
Judge closed bars only / Closed Bars Only
InpClosedBarsOnly
true → false

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 settingsInpWidthType = Percent Of The Price / InpWidthPoints = 1500 / InpClosedBarsOnly = true
Channel Break ZigZag default settings
Defaults: Width Type=Percent, Width in Percent=0.3, Smoothing=1, Closed Bars Only=true. Displays blue confirmation points, red and green marks, and orange and purple channel lines.
View the screen in detail at full size
Channel Break ZigZag default settings (actual size)
Settings change exampleInpWidthType = Points / InpWidthPoints = 400 / InpClosedBarsOnly = false
Channel Break ZigZag settings change example
Change example: Width Type=Points, Width in Points=400, Closed Bars Only=false. The smoothing period stays at 1. This example changes the width method and value and the handling of the latest bar at the same time; it does not show a single item's effect and is not a recommended setting.
View the screen in detail at full size
Channel Break ZigZag settings change example (actual 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

Check the width method first

Percent is a ratio to the price; Points is the symbol's point. 0.3 means 0.3%, not 30%.

Check extreme updates first

On a bar that made a new high when upward or a new low when downward, no reversal check is made for that bar, even if it extends far to the opposite side.

Do not be alarmed if the line jumps

The line keeps the value at the time of each bar. Because it jumps on extreme updates and turns, it is not a straight line redrawn into the past from the current band.

3

What it measures

Organizes price-movement legs using deviation from a sloped channel. It differs from a simple break of a horizontal band, a close-price break, or a prediction of future peaks and troughs.

Smoothing of highs and lows

With period 1 the actual High/Low are used; with 2 or more, the highs and lows are each smoothed separately with an EMA. Both the check and the extreme prices then use smoothed values, which may not match the actual candle highs and lows.

Starting the leg direction

Compared with the oldest bar, if the high rises it is upward; otherwise, if the low falls it is downward. For an outside bar that meets both, upward takes priority. No mark appears just because the first direction is determined.

Upward reversal

Extends the line connecting the high at the leg's start and the highest high to the current bar. On a bar that makes no new high, if the distance from the line to the low exceeds the width, the previous high is confirmed as a red peak.

Downward reversal

Extends the line between the low at the leg's start and the lowest low. On a bar that makes no new low, if the distance from the high to the line exceeds the width, the previous low is confirmed as a green trough.

Width is fixed per leg

The first Percent width is calculated from the high or low of the bar that set the first direction. After that, it is set from the value on the new side of the turn bar, and the width does not change when the same leg updates its extreme.

Line on the turn bar

After a turn, the line is drawn with that bar as the start and extreme of the new leg. Because it is separate from the pre-turn line that determined the mark, looking at the displayed line on the mark's bar does not reproduce the position before the check.

4

Situations for reading the display

A red peak appeared

Indicator
The low moved away from the upward line by more than the width.
Cross-check
Distinguish the confirmation bar from the previous extreme used for the mark's height.
Check
Read it as the previous upward leg having ended under the conditions.
Caution
It is neither a sell instruction nor a record of having sold at that price.

A green trough appeared

Indicator
The high moved away from the downward line by more than the width.
Cross-check
When smoothing is used, the smoothed highs and lows are the target.
Check
Read it as the confirmation point of the previous downward leg.
Caution
It does not guarantee that the rebound continues or that buying is favorable.

It looks as if price left the band, but there is no mark

Indicator
Extreme updates take priority over reversal.
Cross-check
Check new highs/lows, equality, unclosed bars and whether smoothing is used.
Check
Do not work backward from the displayed post-turn line to the conditions before the check.
Caution
A close breaking out of the band alone cannot trigger the check.

Too few or too many marks

Indicator
The number of occurrences changes with the width, smoothing, symbol and history.
Cross-check
Change 1 item at a time on the same data.
Check
The default 0.3% is not a universal setting.
Caution
More dots does not necessarily mean a better setting.

Use while holding a position

Indicator
Use it as an aid to look back on leg boundaries and price positions.
Cross-check
Check it separately from your own reasons for holding, acceptable loss and other information.
Check
Treat taking profit, stopping out and staying out as separate decisions.
Caution
Lines and confirmation points are not automated orders or recommended stops.
5

Steps for checking the display

1

Check the defaults

Start with Percent 0.3, smoothing 1 and Closed Bars Only true. Points 1500 is a value not used by default.

2

Check what the lines mean

Orange is the extreme side; purple is the reversal side, offset by the width. Their upper and lower positions swap with the direction.

3

Check the priority order of the conditions

If there is no extreme update, a reversal is judged. Merely equaling the width does not cause a turn; it must strictly exceed it.

4

Read the confirmation time and price

By default it confirms after the bar closes. Do not regard the mark's price as a price you could have traded at on that bar.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Channel_Break_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 9 inputs. Change them on the Inputs tab of the properties. The English item names defined in the source are shown together with the input names.

Width method

English item name
Width Type
Input name
InpWidthType
Default
Percent Of The Price
Allowed range
Points / Percent
Description
Default Percent. Points uses a width in points; Percent uses a ratio of the price set at the start of the leg.

Width in points

English item name
Width in Points (1 to 100000)
Input name
InpWidthPoints
Default
1500
Allowed range
Integer 1 to 100000
Description
Default 1500. Used with Points. If a 5-digit symbol's point is 0.00001, 1500 points = 0.01500. It is not in pips, and on symbols with different digits it does not give the same price width.

Width as a ratio of the price

English item name
Width in Percent (0.01 to 50)
Input name
InpWidthPercent
Default
0.3
Allowed range
0.01〜50
Description
Default 0.3 (0.3%). Used with Percent. Because the price width is rounded down to point units, the width may become 0 for small prices or ratios.

EMA period for highs and lows

English item name
High and Low Smoothing (EMA, 1 to 100)
Input name
InpSmoothPeriod
Default
1
Allowed range
Integer 1 to 100
Description
Default 1 means no smoothing. The highs and lows are smoothed separately and used for the check and the mark prices.

Judge closed bars only

English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
Default true. No dots or channel lines are shown for the latest bar. With false, the forming bar is also calculated, and dots and lines change 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 / Top right / Bottom 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 2000
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 2000
Description
Adjusts the vertical margin from the specified corner in pixels.
8

Usage specifications

Confirmed dots and lines

When bars are added with the same history and settings, dots and channel values on closed bars are not rewritten to later extremes. Adding or correcting older history or changing settings changes recalculated results.

Blue segments

Dots are connected only after 2 confirmation points have formed. The whole segment in the completed picture was not visible from intermediate times.

Bars that update the extreme

Even if the excursion to the opposite side is large, a bar that makes a new extreme only updates it. This is not a product that outputs 2 marks, a top and a bottom, at the same time on an outside bar.

Forming bar

With false, a reversal point that has appeared may disappear with later extreme updates. Do not treat marks before the bar closes as confirmed points.

Functions not included

There is no statistics text, sound or Alert, orders, account authentication or license file. There is also no function to redraw the channel into the past.

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

The display does not change after changing the width

Check the selected Width Type. With Percent, changing Width in Points does not change the width. However, the value for the unused side must also be within the allowed range.

No line on the latest bar

With Closed Bars Only=true, both the dots and the lines are left empty on the latest bar. This is not an error.

Marks are offset from the actual highs and lows

With a smoothing period of 2 or more, the mark prices are also the EMA highs and lows. Even with smoothing 1, the horizontal position is the later confirmation bar, not the bar where the extreme occurred.

The channel lines jump

The value at the time of each bar is stored. New extremes and changes of direction change the line values and their upper/lower relationship.

Inputs are not accepted

The ranges of Points, Percent and the smoothing period are checked, including the width value that is not selected. Do not enter invalid values in the decimal ratio.

The width is extremely small even with a ratio

A width calculated from a ratio is rounded down to point units. If it is less than 1 point, it becomes 0. Check the symbol's price and point.

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

Extension line

Upward, it connects H[sb] and H[eb]; downward, it connects L[sb] and L[eb], and extends to the current bar by the difference in bar count. It uses the number of bars, not the minutes elapsed. If sb=eb, the line is horizontal.

Width calculation

Points is input×point. Percent is int(ratio×reference price÷point÷100)×point. For positive prices, fractional points are rounded down. The first width is based on the value of the bar where the direction was set, and after that on the value on the new direction's side of the turn bar.

Initial values and priority order

The EMA starts from the oldest High/Low. The first direction is set by checking for a higher high first, and otherwise for a lower low. No vertex is output when the direction starts. After that too, extreme updates take priority over reversal, and an equal value is not an update.

Timing of the channel display

The pre-turn line is used to judge the turn, and the line shown on the same bar is calculated from the post-turn state. The pre-turn judgment line is not additionally kept on that bar.

How the display works

Rather than drawing by moving points to past extreme bars, it records them on the bar where they could be confirmed. There is no statistics display.

Published images and scope verified

M1 is the timeframe display at the time the display examples were made; the price series is mainly at 30-minute intervals, with 1-minute intervals at the end. It is not the frequency of occurrence on actual 1-minute bars. 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.