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%.
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.
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.
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.
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.
Compares the default settings and a settings change example on a screen with only this product applied.
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.
Percent is a ratio to the price; Points is the symbol's point. 0.3 means 0.3%, not 30%.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Start with Percent 0.3, smoothing 1 and Closed Bars Only true. Points 1500 is a value not used by default.
Orange is the extreme side; purple is the reversal side, offset by the width. Their upper and lower positions swap with the direction.
If there is no extreme update, a reversal is judged. Merely equaling the width does not cause a turn; it must strictly exceed it.
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.
| Included file | Purpose / location |
|---|---|
| TRI_Channel_Break_ZigZag.ex5 | The 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.
Extract the ex5 main file rather than leaving it in the compressed file.
In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.
Refresh the Navigator or restart MT5, and apply it to the target chart. When comparing different settings, using separate charts makes checking easier.
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.
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.
InpWidthTypeInpWidthPointsInpWidthPercentInpSmoothPeriodInpClosedBarsOnlyInpTriBrandShowInpTriBrandCornerInpTriBrandXInpTriBrandYWhen 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.
Dots are connected only after 2 confirmation points have formed. The whole segment in the completed picture was not visible from intermediate times.
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.
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.
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.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
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.
With Closed Bars Only=true, both the dots and the lines are left empty on the latest bar. This is not an error.
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 value at the time of each bar is stored. New extremes and changes of direction change the line values and their upper/lower relationship.
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.
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.
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.
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.
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.
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.
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.
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.