Look at the arrows first
Red pointing down is a confirmed peak, and bright green pointing up a confirmed trough. They are not trading instructions.
Shows with dots highs and lows that are not beaten by the surrounding bars, and confirms peaks and troughs from changes in their sequence. The arrows and the vertices of the blue line are placed not on the bar where the peak or trough was, but on a bar after it could be confirmed.
Small dots are fractalsOrange-red dots are highs and green dots lows. They appear after Bars bars on each side have been checked.
Arrows are a separate confirmationA red down arrow marks a confirmed peak, and a bright green up arrow a confirmed trough. Not every small dot gets an arrow.
Separate time and priceThe horizontal position of a mark is the confirmation time, and the vertical position is the price of the past candidate. It can be far from the current candle.
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.
Red pointing down is a confirmed peak, and bright green pointing up a confirmed trough. They are not trading instructions.
When a dot appears, the same place is not necessarily adopted as a swing vertex.
Confirming a fractal needs Bars bars. Because it also waits for the peak or trough to be confirmed, the delay from the vertex candidate can be longer than Bars bars.
Tracks the changes in fractal highs and lows as a state, and shows the time when a peak or trough candidate was confirmed. It is not a calculation that predicts future reversals or ranges.
If the center's low is at or below the lows of Bars bars on each side, it is a lower dot; if the high is at or above the highs on each side, it is an upper dot. Equal values are allowed.
The kept peak candidate is confirmed by a lower fractal lower than the previous lower fractal, or an upper fractal lower than the previous upper fractal.
The kept trough candidate is confirmed by a lower fractal higher than the previous lower fractal, or an upper fractal higher than the previous upper fractal.
The blue line joins the confirmed output points. It does not mean there was a signal at that time on every past bar along the line.
Check the display starting from Bars=2 and Closed Bars Only=true.
Tell apart the colors and shapes of the high/low dots and the arrows of confirmed peaks and troughs.
Marks are placed not on the original peak or trough bar but on a bar after the conditions could be confirmed.
When you change Bars, compare with a separate chart, and check not only the number of appearances but also the times.
| Included file | Purpose / location |
|---|---|
| TRI_Fractal_Swing_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 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.
InpBarsInpClosedBarsOnlyInpTriBrandShowInpTriBrandCornerInpTriBrandXInpTriBrandYWhen a new confirmation point appears, a segment between it and the previous point is added. Not moving confirmed points is a different matter from no lines being added to past sections.
The statement that confirmed output is not moved is limited to cases where new bars are added with the same history and the same settings. It does not guarantee the same results after history corrections, additional loading or input changes.
With Closed Bars Only=false, the high and low of the latest bar used for confirmation change, so the latest dots and arrows can change or disappear.
Confirms using left and right fractals and the relative highs and lows of their prices, not Depth, Deviation and Backstep. It does not reproduce the positions or shape of the standard ZigZag.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
Bars on both sides in the history, and fractals that can confirm a reversal, must be in place. No arrow appears on a side that has no candidate.
This is because the earlier candidate price is far from the confirming bar's range. Adjust the chart's vertical axis and visible range.
The fractal conditions allow equal values. This differs from indicators that require strictly higher or lower values.
Set Bars to an integer from 1 to 50. Out of range, the calculation does not start.
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.
With the time series in oldest-first order, the confirming bar for a fractal center c is t=c+Bars. Because the arrow's price is taken from the earlier candidate that was kept, the candidate's own center+Bars and the arrow's time do not necessarily match.
It starts in the downward state, and on the same confirming bar it processes the lower fractal and then the upper fractal. Older opposite-side candidates are released as needed. A point with the same type and center bar as the one just drawn is not output twice.
0 and 1 are the high side and low side of the blue ZigZag, 2 the peak arrow, 3 the trough arrow, 4 the upper fractal and 5 the lower fractal. A blank is different from a zero value.
The M1 on the screen is the timeframe shown when the display example was made. The main interval of the fixed data is 30 minutes, so the image does not show the frequency of marks or the waiting time on actual 1-minute bars.
Checked with fixed history that uses positive prices. Zero is also used as an internal value meaning no candidate. It does not guarantee performance for all symbols or long histories. There are no notifications or automated trading.