The peak/trough bar and the output bar are different
It is judged on the bar where the right-side bar count is met, and the levels are drawn from that bar. The 50 bars on the right are counted excluding inside bars.
Places 2 levels from peaks and troughs confirmed with bars on the left and right, and draws 5 lines dividing the space between them into 6 equal parts. When a high or low breaks through a level, it searches again for an earlier level that meets the conditions.
The 2 light-blue lines are the referenceThese are Upper Level and Lower Level. They are updated from the bar where the peak or trough was confirmed, and are not placed back on the center bar of the peak or trough.
Gold is the midline, gray is the rest of the gridThe difference between the 2 is divided into 6 equal parts. Gold is the center; gray is 1/6, 2/6, 4/6 and 5/6.
When broken, earlier levels are also searchedWhen a level is broken on a side with no new peak/trough confirmation, earlier levels are searched starting from the newest. The same level may be kept even if a wick breaks through.
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.
It is judged on the bar where the right-side bar count is met, and the levels are drawn from that bar. The 50 bars on the right are counted excluding inside bars.
The 6-part grid is for organizing the relative position of price. It does not represent the success rate of rebounds or breakouts, or a trading direction.
It is a tolerance used to judge whether an earlier level can be adopted. It is not a setting that widens the displayed levels themselves up or down by the Filter amount.
Shows, as prices, the history of confirmed peaks and troughs and the results of retracing broken levels. It does not guarantee future support or resistance, profit targets or order positions.
Only bars whose high is strictly lower than the previous bar's and whose low is strictly higher than the previous bar's are excluded from the count. Bars with the same high or low are counted.
The specified number of bars is secured before and after the center; if no bar in that range has a higher high than the center, it is a peak, and if none has a lower low, it is a trough. Inside bars are also included in the high/low comparison, and tied extremes are accepted.
If a new peak or trough is confirmed on that side, its price takes priority. If none is confirmed and a high or low strictly breaks through the existing level, an earlier level is searched for.
On the Upper side, it selects the most recent record where the close is less than or equal to "past Upper + the difference between the 2 levels at that time × Filter ÷ 100". On the Lower side, it is the most recent record where the close is greater than or equal to "past Lower − the same difference × Filter ÷ 100". If none is found, the current high or low is used.
With Lower as D and Upper as U, the lines are D + (U−D) × 1/6, 2/6, 3/6, 4/6 and 5/6. The midline is the average, not the Fibonacci 38.2% or 61.8%.
Upper and Lower are the names of the levels updated from the high side and the low side respectively. With a large Filter and the like, the two can be reversed or equal. Upper is not necessarily always higher, and price is not necessarily between the 2 lines.
Start with left/right 50, Filter 10, closed bars only true. Even the first candidate alone needs 101 counted bars including the center, and confirming both upper and lower may take longer.
Check the 2 light-blue levels, the gold center and the 4 gray lines. Also watch for lines outside the vertical display range.
Increasing Right Bars increases the following bars needed for confirmation. Because of inside bars, the specified count and the number of chart bars elapsed do not match.
Do not change it together with the left/right counts; first compare with positive values. Switching to 0 changes not only the tolerance but also the price used for the judgment.
| Included file | Purpose / location |
|---|---|
| TRI_Fractal_Level_Grid.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.
InpLeftBarsInpRightBarsInpFilterInpClosedBarsOnlyInpTriBrandShowInpTriBrandCornerInpTriBrandXInpTriBrandYLevels on closed bars are not redrawn to the center of peaks or troughs found later. Recalculating from the beginning after adding to or correcting the history or changing settings may change results.
By default the latest bar is blank. Adjacent bars where the level switches are connected by a line, so a step change may look diagonal.
The 7 lines are displayed once both upper and lower levels are available as positive prices. The implementation is not intended for uses that handle prices of zero or below.
There are no Fibonacci fan or retracement objects, arrows, notification sounds, automatic orders, specification of another timeframe or account authentication. There is also no input to change the grid ratios.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
History sufficient for the left and right bar counts and confirmation of both a peak and a trough are required. Many inside bars make confirmation take longer.
It is judged on 50 bars excluding inside bars. The candidate must also actually meet the highest-high or lowest-low condition.
Yes. Only bars whose high is strictly lower and whose low is strictly higher are excluded.
The price switches when a new peak or trough is confirmed or an earlier level is re-adopted. It is not a smooth moving average line.
Filter is a condition for selecting where to return to. It does not uniformly push the level prices outward, and the result may be the same.
Left Bars and Right Bars are integers from 1 to 500, and Filter is an integer from 0 to 1000. Loading is refused if they are out of range.
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.
No new fractal is confirmed on bars that are not counted. However, level breaks and the search for earlier levels may still be performed. The extreme comparison covers all bars between the chosen left and right ends.
The history from the bar where upper and lower first both existed onward is searched, starting from the newest. A value equal to the tolerance boundary can also be adopted. The Filter width is calculated not from the current band but from the band of each past bar that is a candidate.
With Filter=0, past levels are searched using highs and lows rather than the close. This differs from a close-based judgment with the tolerance simply set to zero.
While Upper=12 and Lower=4 are held, with Filter=100 the same upper level can be selected for a close of 20 or less. If a new trough at 13 is confirmed in the meantime, the result can be Upper=12 and Lower=13. The grid divides the space between those 2 numbers as calculated and does not correct the numerical order.
The published images are display examples. 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. This does not mean the same frequency of occurrence on actual 1-minute bars. The images are from before the brand display was added. The on-screen display of the product with the brand display has not yet been verified.