MT5 indicators← Two Depth ZigZag Marks 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

Two Depth ZigZag Marks

Organizes direction with a long ZigZag and records price changes with marks after a short swing is confirmed. Arrows and opposite-direction dots together come to 1 mark for every 1 short swing.

Indicator name: Two Depth ZigZag MarksMetaTrader 5Price chart

Confirm the long direction → confirm the short turn → judge the mark on a later bar

When the long direction is upwardShort trough confirmedLater markThe extreme bar and the confirmation bar are different
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Read the long segments with the blue lineIt connects peaks and troughs confirmed with the long depth. A point's price is the extreme; its horizontal position is the bar where it could later be confirmed.

2

Short turns are used internallyThe short ZigZag itself is not drawn. When a short trough or peak is confirmed, the mark's reference is updated and the following bars are checked.

3

Distinguish green, red and orangeGreen is a mark along the long upward direction, red is a mark along the long downward direction. Orange dots are movement opposite to the long direction. They do not specify trade orders.

Long depth 55, short depth 171 mark per short swingClosed 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
Short depth / Short Depth (bars, 2 to Long Depth - 1)
InpShortDepth
17 → 5
Width required for a with-direction mark / Mark Gap (points, 0 to 100000)
InpGap
10 → 0

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 settingsInpShortDepth = 17 / InpGap = 10
Two Depth ZigZag Marks default settings
Defaults: Long Depth=55, Short Depth=17, Deviation=10, Backstep=3, Mark Gap=10, Closed Bars Only=true. Displays a blue line and 3 kinds of marks. The orange dots are small, so check them at full size as well.
View the screen in detail at full size
Two Depth ZigZag Marks default settings (actual size)
Settings change exampleInpShortDepth = 5 / InpGap = 0
Two Depth ZigZag Marks settings change example
Change example: Short Depth=5, Mark Gap=0. The other inputs stay at their defaults. This example changes the short-turn condition and the width for with-direction marks at the same time, and these are not recommended values.
View the screen in detail at full size
Two Depth ZigZag Marks 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

Keep the long line and the short judgment separate

The visible blue line is the long depth only. Short ZigZag lines and horizontal lines for the reference price are not shown.

When to wait for a mark

No mark is output on the bar where the short turn is confirmed. The condition must be met on the next bar or later. No mark appears while the long direction is not yet confirmed either.

If a dot comes first, no arrow is added

For a swing where an orange dot appeared first, no arrow is added even if the long direction changes later. Once the next short turn is confirmed, 1 mark can be output again.

3

What it measures

A display that organizes 2 confirmed swings, long and short, and changes in a blended price. It does not directly measure future price movement, trading advantage, or overbought/oversold conditions.

Long direction

After a trough is confirmed with the long depth, the direction is treated as upward; after a peak is confirmed, as downward. The direction is not confirmed just because the first candidate exists.

Conditions for confirming a turn

While rising, updating the high takes priority. A peak is confirmed when a bar that does not update makes the lowest low within the depth, the difference from the candidate high exceeds Deviation, and at least Backstep bars have passed since the candidate. While falling, it is the reverse.

Reference price of the mark

Stores the blended price (5×close + 2×open + high + low) ÷ 9 of the bar where the short extreme occurred. It is neither the extreme price itself nor the close of the confirmation bar.

With-direction arrows

If the long direction is up after a short trough, green appears when the current blended price rises by Mark Gap or more from the reference. If the long direction is down after a short peak, red appears when it falls by the same width or more.

Opposite-direction dots

If the long direction is down after a short trough, orange appears when the blended price goes above the reference. If the long direction is up after a short peak, orange appears when it goes below the reference. Mark Gap is not used for these dots.

Mark height

Green arrows are placed at the low 1 bar earlier and red arrows at the high 1 bar earlier. Orange dots are at the current blended price. In every case, the horizontal position is the bar where the condition was judged.

4

Situations for reading the display

A green arrow appeared

Indicator
The long direction is up, and the most recent short turn is a trough.
Cross-check
Read it as the blended price having risen by the width or more after the short trough was confirmed.
Check
Check it as a record of a price change along the upward direction.
Caution
It is not a buy instruction, nor does it mean a fill was possible at the arrow's height.

A red arrow appeared

Indicator
The long direction is down, and the most recent short turn is a peak.
Cross-check
Read it as the blended price having fallen by the width or more after the short peak was confirmed.
Check
Check it as a record of a price change along the downward direction.
Caution
It does not guarantee that selling is favorable or that the decline continues.

An orange dot appeared

Indicator
The movement from the short turn is opposite to the long direction.
Cross-check
Note that it appears even below Mark Gap.
Check
Distinguish it as a case where the long and short directions do not agree.
Caution
It is not a price for a limit order, taking profit or a stop loss.

The line moved but there is no mark

Indicator
It may be the confirmation bar of a short turn, or the mark for that swing may already have been used.
Cross-check
Check the closed-bars-only setting, the initialization of the long direction, and Gap.
Check
Do not try to infer the short internal state fully from the visible long line alone.
Caution
A change in the long direction alone does not reset the mark count.

Organize price movement while holding a position

Indicator
Compare the long segments with the with-direction and opposite-direction marks.
Cross-check
Check it separately from your own conditions, such as your reasons for holding and acceptable loss.
Check
Treat staying out, holding and closing as separate decisions.
Caution
This product does not place automated orders or make trading recommendations.
5

Steps for checking the display

1

Check the display from the default settings

Long 55, short 17, Deviation 10, Backstep 3, Gap 10, closed bars only true. Sufficient history and turn conditions are required.

2

Check the horizontal position of the long line

Points are on the later confirmation bar, not on the bar where the extreme occurred. Do not mistake the slope of the line for the actual price path.

3

Read the type and count of marks

Green and red are with-direction, orange is opposite-direction. Across the 3 types together, there is 1 for every 1 short swing.

4

Compare settings 1 item at a time

Short depth and Gap are separate conditions. If you want fewer dots, increasing Gap alone does not change the orange condition.

6

Installation and checking the package contents

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

Long depth

English item name
Long Depth (bars, 3 to 1000)
Input name
InpLongDepth
Default
55
Allowed range
Integer 3 to 1000
Description
Default 55. The number of bars in the calculation window used to confirm long peaks and troughs. It is the number of chart bars, not a timeframe.

Short depth

English item name
Short Depth (bars, 2 to Long Depth - 1)
Input name
InpShortDepth
Default
17
Allowed range
Integer 2 to Long Depth−1
Description
Default 17. The calculation window for the short turns used internally. Make it smaller than the long depth.

Price range required for a turn

English item name
Deviation (points, 0 to 100000)
Input name
InpDeviation
Default
10
Allowed range
Integer 0 to 100000 points
Description
Default 10. Shared by long and short. The difference from the candidate extreme must strictly exceed this width. Merely being equal does not cause a turn.

Bars to wait from the extreme

English item name
Backstep (bars, 0 to 1000)
Input name
InpBackstep
Default
3
Allowed range
Integer 0 to 1000
Description
Default 3. Shared by long and short. A turn requires that at least the specified number of bars have passed since the candidate extreme's bar. It is not the number of bars over which past points are erased.

Width required for a with-direction mark

English item name
Mark Gap (points, 0 to 100000)
Input name
InpGap
Default
10
Allowed range
Integer 0 to 100000 points
Description
Default 10. Used for the green and red arrows, not for the orange dots. At 0, even a blended price equal to the reference meets the with-direction condition.

Judge closed bars only

English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
Default true. Both the line points and the marks are left empty on the latest bar. false also judges the forming bar, so points and marks before it closes may change or disappear.

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 history and recalculation

When bars are added with the same history and settings, confirmed dots and marks on closed bars are not later deleted and reselected. Adding to or correcting the history or changing settings changes recalculated results.

When segments become visible

The blue line connects points only after 2 confirmation points have formed. The whole line in the completed picture was not visible from intermediate times.

point and pip

Widths are in the symbol's points and are not automatically linked to spread or pips. If point=0.00001, 10 point=0.00010. If the digits change, the same input gives a different price width.

Functions not included

There is no short zigzag display, no notifications or sounds, no automatic orders, no account authentication and no license file.

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

Only the blue line, no marks

A confirmed short turn, a price change from the reference, and an unused swing are required. Marks do not necessarily appear just because the blue line is visible.

The latest bar is blank

This is normal with Closed Bars Only=true. Changing it to false also shows changes on the forming bar, but these cannot be treated as confirmed marks.

Dots still appear after increasing Gap

The orange Counter Mark does not use Gap. It is only a strict comparison of going above or below the reference.

Orange dots are hard to see

They are small dots of width 1. Zoom in or check the colors in the properties. They are not the same size as the arrows.

The mark price is outside the bar

Green and red are the previous bar's low and high. The confirmation points of the long line are also past extreme prices, so they may not match the high/low of the bar where they are shown.

Inputs are not accepted

Check: long depth 3 to 1000, short depth at least 2 and less than the long depth, Deviation and Gap 0 to 100000, Backstep 0 to 1000.

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

Calculation order

On each bar, the long turn is updated first, then the short turn is checked. If there is a short turn, only the reference is updated and no mark is judged on that bar. If not, the mark is judged with the long direction updated this time and the stored short reference.

Extremes and equality

The highest high and lowest low within the depth include ties, but updating the candidate extreme requires a strict new high or new low. If both are met in the initial state, the upward candidate takes priority.

Mark reference and the 1-time limit

The reference is the blended price of the short extreme's bar. Arrows and the Counter Mark share a common used state; it is not re-enabled when the long direction changes and is reset only by the next short turn.

How the display works

Points and marks are not erased afterward; they are recorded on the bar where they can be confirmed. The width is specified in fixed points, and the long points are drawn at the extreme prices. There are no notifications.

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.