MT5 indicators← Blend Smooth 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

Blend Smooth ZigZag

Smooths a price that blends the open, high, low and close, and on the bar where the direction changes, records the high or low of the search range. The blue zigzag and the top and bottom arrows show the breaks in price movement.

Indicator name: Blend Smooth ZigZagMetaTrader 5Price chart

Confirm the direction with the smoothed price → place on the bar that confirmed the range extreme

Blended price: a price weighted toward the closeBar before last ×1 + previous bar ×2 + current bar ×1Divide the total by 4 (repeat 1 to 5 times)Price of an earlier highHorizontal position is the turning barThe smoothed value is for internal calculation. The blue line connects the recorded extremes.
Schematic diagram of how to read it. This is not an actual terminal screen.
1

The horizontal position of an arrow is the confirming barThe arrow is not moved back to the bar where the earlier high or low formed; it is placed on the bar where the direction of the smoothed value changed. By default, the indicator waits until that bar closes.

2

The price of an arrow is the extreme of the search rangeThe Crimson down arrow is a top, and the LimeGreen up arrow is a bottom. They do not necessarily match the high or low of that bar's candle.

3

The blue line is not the smoothed price itselfThe DodgerBlue line connects the recorded extreme points with straight lines. The smoothed values used in the calculation are not shown on the chart.

Default is 1 smoothing pass1 to 5 smoothing passesDefault is closed bars onlyMT5, 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
Smoothing passes / Smoothing Passes (1 to 5)
InpPasses
1 → 3

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 settingsInpPasses = 1
Blend Smooth ZigZag default settings
Defaults: Smoothing Passes=1, Closed Bars Only=true. The blue line and the top and bottom arrows also record small turns. Arrows may appear to the right of the bar where the extreme formed.
View the screen in detail at full size
Blend Smooth ZigZag default settings (actual size)
Settings change exampleInpPasses = 3
Blend Smooth ZigZag settings change example
Change example: only Smoothing Passes was changed from 1 to 3. On this screen, the number of points decreases and the timing of the breaks also changes. The change example is not a recommended value.
View the screen in detail at full size
Blend Smooth ZigZag settings change example (actual size)

This is an example for explaining the display. M1 on the screen is the timeframe display at the time the display examples were made and does not show the frequency of occurrence on actual 1-minute bars. The published images are screens from before the brand display was added. The calculation and drawing conditions are the same, and the included version has display settings for the brand text and QR. The settings change example is not a recommended value. Details can be checked in the actual-size display. Also check the price scale of the main chart and the positions of the candles.

2

How to read it in 30 seconds

Organize changes in direction

If the smoothed value rises from the previous bar, the direction is up; if it falls, down; if it is the same, the previous direction is kept. A point is also placed when the direction is first determined.

Separate time and price

Read the confirmed time from the horizontal position of the arrow, and the range extreme from the vertical position. It is not a record that trades could have been made at past extremes.

Do not treat it as a forecast line

The blue line is a display that connects confirmed points. It does not predict future prices or the time of the next turn from the slope of the line.

3

What it measures

Smooths a blended price to capture changes in direction and records the high and low of that range. It does not measure higher timeframe agreement, volume, overheating or trading advantage.

Blended price

Uses (5×close + 2×open + high + low) ÷ 9 for each bar. It is not a moving average of the close only, but a price that gives the close the heaviest weight.

1-2-1 smoothing

Averages 3 bars (bar before last, previous and current) with weights 1, 2 and 1. With 1 pass, the previous bar is the center, and the value can be calculated with information up to the current bar. The same process is applied again to the previous result; choose 1 to 5 passes.

Start of the search

To determine a bottom, the indicator searches for the lowest low from the bar after the one where the previous top's extreme actually formed, up to the current decision bar. A top is the highest high from the bar after the previous bottom's extreme. The search does not start from the bar where the previous arrow was shown.

When you increase the smoothing passes

The blended price over a wider range takes effect, and the timing and number of points change. With K passes, 2K+1 bars are involved, and the center of the weights is K bars back. This does not mean that a turn is always delayed by a fixed number of bars.

4

Situations for reading the display

Turned upward

Indicator
A green bottom arrow appeared.
Cross-check
Cross-check the confirmed time with where the price moved afterward.
Check
Treat it as a break where the direction switched from falling to rising.
Caution
The bottom price can be an earlier value. It is not a signal that you can buy at that price.

Turned downward

Indicator
A red top arrow appeared.
Cross-check
Compare the point's price with the current price and the previous break.
Check
Use it as material for looking back at a break from rising to falling.
Caution
It does not guarantee that you could sell at the top or that the decline will continue.

Many small points

Indicator
Tops and bottoms appear alternately at short intervals.
Cross-check
Compare the price range and price movement with different smoothing passes on separate charts.
Check
Check the display difference in how much small movement is kept.
Caution
The number of points is not the number of trading opportunities or the size of profit.

An opposite break appeared while holding a position

Indicator
A turn opposite to the direction of your position was recorded.
Cross-check
Cross-check it with the holding and exit conditions you decided in advance.
Check
Use it as material for review; do not decide to close a position on the arrow alone.
Caution
There is no automatic order, stop-loss or take-profit function.

Change the smoothing passes

Indicator
The number and position of points differ between 1 pass and 3 passes.
Cross-check
Compare with Closed Bars Only and the timeframe set the same.
Check
Read it as a difference in the calculation range, and understand that the whole history is recalculated after the change.
Caution
Choosing only settings that look good in hindsight does not guarantee future results.

Show the latest bar

Indicator
With Closed Bars Only=false, points also appear on the forming bar.
Cross-check
Check whether the points change before and after the bar closes.
Check
Distinguish the provisional display on the forming bar from the confirmed display on closed bars.
Caution
Points appear and disappear, and values may change.
5

Steps for checking the display

1

Display with default values

Start with Smoothing Passes=1 and Closed Bars Only=true, and check the blue line and the top and bottom arrows.

2

Read from the horizontal position

It is a record that could first be confirmed when the arrow's bar closed. It is not treated as if the display was known at the bar of the earlier extreme.

3

Look at the vertical position and the search range

The extreme is searched from the bar after the previous opposite extreme. It is not abnormal if it does not match the high or low of the candle with the arrow.

4

Compare under matched conditions

When changing the number of passes, compare on the same timeframe with the same Closed Bars Only. The smoothed value itself is not shown; the blue line you see connects the points.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Blend_Smooth_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.

Smoothing passes

English item name
Smoothing Passes (1 to 5)
Input name
InpPasses
Default
1
Allowed range
Integer from 1 to 5
Description
Default 1. The number of times the 1-2-1 average is repeated. The blended price of 3 bars is involved with 1 pass, 7 bars with 3 passes, and 11 bars with 5 passes.

Closed bars only

English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
Default true. The direction and points are not decided on the latest forming bar. With false, the decision is also made on the latest bar, and the display can change until it closes.

Brand and QR display

English item name
Show Trilogy brand and QR code
Input name
InpTriBrandShow
Default
true
Allowed range
true / false
Description
Default true. Turns the brand text and QR display on or off. The calculation does not change.

Brand reference corner

English item name
Brand position (chart corner)
Input name
InpTriBrandCorner
Default
Bottom left
Allowed range
Top left, bottom left, bottom right, top right
Description
Default is bottom left. The display position of the brand.

Brand horizontal margin

English item name
Brand horizontal offset (pixels)
Input name
InpTriBrandX
Default
10
Allowed range
Integer (limited to 0 to 4000 pixels when displayed)
Description
Default 10 pixels. Horizontal margin from the reference corner. If it is not visible, set it back to 10.

Brand vertical margin

English item name
Brand vertical offset (pixels)
Input name
InpTriBrandY
Default
10
Allowed range
Integer (limited to 0 to 4000 pixels when displayed)
Description
Default 10 pixels. Vertical margin from the reference corner. It does not affect the calculation conditions.
8

Usage specifications

Chart timeframe only

There is no function to map higher timeframe nodes onto a lower timeframe. It calculates from the prices of the chart currently open.

Confirmed dots and line extension

In normal calculation where subsequent bars increase with the same inputs and history, dots on closed bars are not moved into the past. When a new dot forms, a new segment is added between it and the previous dot.

Recalculation is separate

When settings or the timeframe are changed, or the whole is recalculated due to additions to or corrections of the history, past dots can also change.

Display only

There are no orders, notifications, provisional dotted line up to the latest bar, or output of a node list. The blue line is not the price movement itself or a path of executions.

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 smoothed line is not visible

The smoothed value is for internal calculation. Only the zigzag of highs and lows determined from its direction and the arrows are displayed.

The arrow is away from the candle

The vertical position of the arrow is the range extreme, and the horizontal position is the bar where the direction was decided. It is normal for these two bars to differ.

No dots appear at first

K smoothing passes need history. The direction can be decided from the (2K+2)th bar onward, counted from the oldest bar, but if the value is flat, no direction is determined. By default, the indicator waits until the decision bar closes.

The first point does not look like a turn

A point is also placed when up or down is first determined from a state with no direction set. The first point has no earlier point in the opposite direction.

The number of passes is not accepted

Smoothing Passes is an integer from 1 to 5. 0, negative numbers and 6 or more are rejected at initialization.

The latest point or line changes

Check whether false is being used with the forming bar. Fixing points on closed bars in the normal calculation is a different matter from adding a line segment to a new 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

Smoothing formula and lag

With the oldest bar as 0, N[i]=(5C[i]+2O[i]+H[i]+L[i])/9. T0=N, Tk[i]=(T(k−1)[i−2]+2T(k−1)[i−1]+T(k−1)[i])/4. Valid for i≥2k. With 1 pass, the center is i−1, but the product uses Tk[i] as is and does not shift it by 1 more bar. The center of the weights for K passes is i−K.

Direction, search and equal values

For i≥2K+1, TK[i] is compared with TK[i−1]; equal values keep the previous direction. If it changes upward (including from no initial direction), the lowest low from the bar after the previous top's extreme bar up to i is used; if downward, the highest high from the bar after the previous bottom's extreme bar is used. For equal extremes, the older bar found first is kept.

Output

buffer 0=ZigZag, 1=Top, 2=Bottom. They output prices, and empty is EMPTY_VALUE. ZigZag is DRAW_SECTION, DodgerBlue, width 2; Top is Crimson symbol 234; Bottom is LimeGreen symbol 233; each width 2.

Verified scope

The published images and numbers were checked by feeding fixed price data to the product before the brand display was added. For the product with the brand display, we confirmed that the calculation part is the same, but the on-screen display has not yet been verified. Whether the values match other indicators with the same name, intermediate calculation values, the subwindow name and Data Window display, and behavior with long history or symbols with different price digits have not been verified.