Horizontal position is the confirmation time
Points are not drawn back at the extreme's bar; they are placed on the bar that confirmed the reversal.
Confirms a reversal when price pulls back from an extreme by more than a fixed range or a percentage of price. The height of a vertex is the extreme price, and the horizontal position is the bar that confirmed the reversal.
Blue lineConnects confirmed tops and bottoms.
Red tops, green bottomsThe held extreme price is shown on the bar that confirmed the reversal.
2 points on the same barBecause of the calculation order, both a top and a bottom can be confirmed on 1 bar.
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.
Points are not drawn back at the extreme's bar; they are placed on the bar that confirmed the reversal.
Points are in the price point unit; the percentage mode is a ratio to the price being compared. It is not a pullback ratio relative to the previous leg.
The calculation rule is low → high for bullish and unchanged bars, and high → low for bearish bars. It does not reproduce the actual order in which prices were reached.
Records whether the pullback from the held extreme exceeded the threshold. It differs from zigzags decided by a bar-count window or a ratio to the previous leg.
Points × the symbol's point is the price width. If point is 0.00001, 50 points is 0.00050; if point is 0.001, it is 0.050. Do not confuse them with pips.
With comparison price c and percentage p%, in the upward direction a reversal occurs when c×(1+p/100) is smaller than the extreme. It differs from a formula that subtracts p% of the extreme price.
A pullback exactly equal to the boundary does not reverse; it reverses only when it exceeds the boundary. In the rounded display on screen, they can look equal.
It does not predict future vertices or profit, and it does not show that you could have traded at the extreme price at that time.
Check Points, 50, Percent 0.08 and Closed Bars Only true.
Check the price width from the symbol's point and the number of points.
The horizontal position of a mark is the confirming bar, and its height is the extreme price. The latest candidate is not drawn.
Change only the number of points or the percentage on a separate chart with the same history. The change example is not a recommended value.
| Included file | Purpose / location |
|---|---|
| TRI_Reversal_Amount_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 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.
InpTypeInpPointsInpPercentInpClosedBarsOnlyInpTriBrandShowInpTriBrandCornerInpTriBrandXInpTriBrandYWhen closed bars are added with the same history and settings, confirmed dots are not moved into the past. Do not read a segment added from a new dot as having been visible from earlier.
Recalculates on settings changes, correction or additional loading of history, and changes of the start position. In these cases, the display is not guaranteed to stay unchanged.
Bearish bars are treated as high → low, others as low → high. The tick order or the actual path is not reconstructed.
Starts as upward at the first price. If it is a down bar, a top may appear on the first bar. The initial display changes depending on where the history begins.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
If no pullback exceeds the threshold, no points appear. Several points are needed to connect a line.
With true, the forming bar is not processed. Even with false, nothing appears unless the conditions are met.
By design, the extreme price is drawn on the confirming bar, so it does not necessarily match the confirming bar's high or low.
The value on the side that is not selected is not used in the reversal calculation. Depending on the display range, differences can be hard to see.
Keep both Points and Percent within range. The side that is not used is also checked.
Adjust the price scale and the display range, and also check the actual-size screen. When there are 2 points on 1 bar, they form a vertical line.
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.
Let the extreme be E, the comparison price c, the number of points N, point q, and the percentage p%. Upward: c+Nq<E (percentage: c×(1+p/100)<E); downward: c−Nq>E (percentage: c×(1−p/100)>E). Equality is not included, and the decision is made after the extreme is updated.
Up to 1 reversal per 1 price and up to 2 reversals per 1 bar. Tops and bottoms are output to the 2 buffers of DRAW_ZIGZAG and to their respective arrows.
The direction, the extreme price and its bar are held, but the output goes to the confirming bar. Candidates are not drawn on past bars in advance.
M1 is the timeframe shown when the display example was made. The price data is mainly at 30-minute intervals, and the image does not show how often marks appear 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.