MT5 indicators← NonLag Trend 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

NonLag Trend ZigZag

When the orange line changes direction by more than a threshold based on the range of change, the top or bottom of the segment is confirmed. The height of the mark is the extreme price, and the horizontal position is the confirming bar.

Indicator name: NonLag Trend ZigZagMetaTrader 5Price chart

Orange line turns → extreme of the segment confirmed → connected by the blue line

Previous topBar with the extremeBottom mark on the confirming barThe line's rise exceeds the threshold
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Orange is the calculated lineA line of a weighted average of price that keeps the previous value for small changes. Its role differs from the blue zigzag.

2

Red is a top, green is a bottomDrawn on the bar where the line's direction changes, after confirming the high or low of the segment. Blue connects those confirmed points.

3

Separate height and horizontal positionThe mark is not drawn back on the past bar that set its price. The horizontal position is the bar on which the condition was confirmed.

Length 100 / Filter 2Filter is a multiplierBy default, points are confirmed on closed barsMT5, 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
Line calculation period / Length (3 to 400)
InpLength
100 → 20
Change threshold multiplier / Filter (0 to 10)
InpFilter
2 → 1

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 = 100 / InpFilter = 2
NonLag Trend ZigZag default settings
Defaults: Length 100, Filter 2, Applied Price Close, Closed Bars Only true. Displays a small number of confirmation points and an orange line.
View the screen in detail at full size
NonLag Trend ZigZag default settings (full size)
Settings change exampleInpLength = 20 / InpFilter = 1
NonLag Trend ZigZag settings change example
Change example: Length 20, Filter 1. This example changes 2 items at the same time, and there are more confirmed points. The difference cannot be read as the effect of only one of them.
View the screen in detail at full size
NonLag Trend 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

Distinguish the 2 lines

Orange is a line calculated from price. Blue is a line connecting the confirmed tops and bottoms.

Check the time of a mark

A bar with red or green is the bar on which the reversal was confirmed from the line's direction. It is not necessarily the bar that reached that price.

Check the settings and history

Length also affects the number of history bars needed for preparation. Filter is not in points; it is a multiplier applied to the calculated dispersion.

3

What it measures

Using the turns of a line that smooths price, it confirms the extremes of segments afterward. The name "NonLag" does not mean that there is zero lag or that future tops and bottoms can be predicted.

Weighted average of price

It uses the latest 5×Length−2 bars. Because the weights include positive and negative values, unlike a normal simple average, the line can go outside the price range of that segment.

Holding the value on small changes

It uses the distance between the current weighted average and the previous held line. On a bar where that distance is smaller than Filter × dispersion, the previous line value is kept.

Direction check

If the rise of the held line from 1 bar earlier exceeds the threshold, the direction is up; if the fall exceeds it, down. Within the threshold, the earlier direction is kept.

Search for bottoms and tops

When the direction turns up, the lowest low from the bar after the bar with the previously adopted top extreme up to now becomes the bottom. The down direction is the reverse. The search does not start from the bar where the previous mark was shown.

When the same extreme exists

For the same price, the older bar within the range is chosen. Because the bar of that extreme is also used for the next search range, the way equal values are chosen also matters.

Where the point is placed

The extreme price is placed on the confirming bar. A bottom is given even on the first check that turns up, and a top even on the first check that turns down. Candidate points on the forming bar are not extended.

4

Situations for reading the display

A green trough appeared

Indicator
The line turned up, and the lowest low of the search segment was confirmed.
Cross-check
Look at the orange line, and at the price and confirming bar of the mark, separately.
Check
Read the difference between the time of the bottom and the time of the check.
Caution
It does not guarantee that you can buy at that price or that a rise follows.

A red peak appeared

Indicator
The line turned down, and the highest high of the search segment was confirmed.
Cross-check
Check which highs were included after the previous bottom extreme.
Check
Read it as a record of the reversal.
Caution
It is not a sell instruction or a forecast of a later fall.

The line moved but no mark appears

Indicator
When the same direction continues, or when the change is the same size as the threshold, a new reversal point may not appear.
Cross-check
Check the earlier direction and whether this change strictly exceeded the threshold.
Check
Distinguish a change of the line from the addition of a reversal point.
Caution
It is not a product that draws a point every time the line moves.

The orange line is horizontal

Indicator
Possible causes are the process that holds the value on small changes, or equal calculation results.
Cross-check
Check whether there is a price feed, and check Filter and Length.
Check
Do not decide that the whole market is in a range from the horizontal part of the line alone.
Caution
It does not necessarily mean that the price itself has stopped.

More points with short settings

Indicator
In the change example, both Length and Filter are made smaller.
Cross-check
Comparing 1 item at a time on the same history lets you check the effects separately.
Check
Compare the density of points with the delay of confirmation.
Caution
The number of points does not necessarily change monotonically with the value, and these are not recommended settings.
5

Steps for checking the display

1

Apply with the defaults

Check Length 100, Filter 2, Close, Closed Bars Only true.

2

Check the history and the line

The default line needs 498 bars, and the direction check needs the 697th bar or later, counting the oldest as bar 1. With closed bars only, that check bar must also be closed.

3

Read the confirmed points

Read the height of red and green as the extreme price and the horizontal position as the confirming bar, and match them with the turns of the orange line.

4

Separate the conditions of change

Distinguish the change of the line on the forming bar, the confirmed points, and the blue line segment added with the next point.

6

Installation and checking the package contents

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

Line calculation period

English item name
Length (3 to 400)
Input name
InpLength
Default
100
Allowed range
Integer 3 to 400
Description
Default 100. The prices used for the average are 5×Length−2 bars. The larger the setting, the longer the history to prepare.

Change threshold multiplier

English item name
Filter (0 to 10)
Input name
InpFilter
Default
2
Allowed range
Finite number from 0 to 10
Description
Default 2. A multiplier applied to the dispersion of the calculated change. It is not in points or pips. With 0, the value-keeping process does not work, and the direction is decided by strict rises and falls of the line.

Price used for the line calculation

English item name
Applied Price
Input name
InpPrice
Default
Close
Allowed range
Close / Open / High / Low / Median / Typical / Weighted
Description
Default Close. What changes is the price used to calculate the line. The search for tops and bottoms uses the candle High and Low regardless of the setting.

Check points on closed bars

English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
Default true. On the latest forming bar, the direction and points are not checked, but the orange line is drawn and updated. With false, the points also 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

When closed bars are added with the same history and settings, confirmed dots are not moved to the bar of a past extreme. Settings changes, adding older history or corrections may change recalculated results.

Blue segments

A dot is connected to the previous one only after the next confirmation point appears. The completed diagonal line as a whole cannot be read as having been visible from intermediate times.

Latest line

Even with Closed Bars Only true, the latest value of the orange line updates. This setting limits dots to closed bars; it does not freeze all drawing.

Values and time

A mark may appear at a price away from the range of the confirming bar where the mark is. It is not a price at which a trade could have been made on that bar, nor a record of execution.

Functions not included

There is no notification, no order function and no limiting of the calculation range by time-specified objects. Account authentication and a license file are also not required.

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

Few points despite a long history

This is because it waits until the line changes direction. The default is Length 100, Filter 2. Check that the line is drawn and that history and a price feed are available.

Only the line appears, with no blue line

The preparation of the line and the start of the point check happen at different times. Also, 2 confirmed points are needed to connect a blue line segment.

Applied Price was changed, but the marks are at highs and lows

Applied Price is used to calculate the orange line. The price of a mark is always chosen from the High and Low of the segment.

Even with Filter 0, points do not appear on every bar

A point appears only when the line changes direction. On an equal value the direction is kept, and a change in the same direction does not give a new reversal point either.

Inputs are not accepted

Length is an integer from 3 to 400, Filter a finite value from 0 to 10, and Applied Price is chosen from 7 types.

Marks touch the edge

Adjust the chart's vertical scale and display range. The published example also has marks near the top and bottom edges, so you can check it together with the full-size view.

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

Weights and line

N=5L−2. It uses cosine-shaped weights that decay with distance from the newest bar, and divides the weighted sum by the sum of the weights. Because negative weights are included, there is no guarantee that the line stays within the range of the input prices.

Definition of the dispersion

D[t]=|current weighted average − previous held line|, A[t]=average of the latest L values of D. S[t] is the root mean square of (D[k]−A[k]) for each of the latest L bars. It uses each bar's own average A[k], which differs from the normal standard deviation that subtracts the current average A[t] from all bars. F=Filter×S.

Equality boundary

Only when D<F is the previous line kept; otherwise the current weighted average is adopted. On the other hand, the direction changes only when the change of the line strictly exceeds F. When D=F, the direction may not change even if the line moves.

First bar and search range

Counting the oldest as 0, the line is calculated from 5L−3 and the direction from 7L−4. By default, the line starts at the 498th bar and the direction at the 697th bar. The first extreme search also starts from the direction start bar and does not use older highs and lows. After that, it searches from the bar after the bar with the previous opposite-side extreme, including the confirming bar.

Timeframe and history

It is calculated on the price series of each chart, and there is no input to select a higher timeframe. Differences in the initial history affect the held line, direction and search range, so an exact match with a different history start position is not guaranteed.

Scope of the published images

M1 is the timeframe shown when the display example was created, and the price series is mainly at 30-minute intervals. It is not an example of the frequency of actual 1-minute bars. The published images are screens before the brand display was added; the screen display on the product with the brand display has not been checked yet.