Which line is it
Upper Line Angle is the slope between peaks, and Lower Line Angle the slope between troughs. Blue is not necessarily above red.
The slopes of the lines connecting confirmed peaks to each other and troughs to each other are read as 2 lines in a separate window. The values are calculated from the price difference and the elapsed time, and are not the angle of the line seen on screen itself.
Distinguish blue and redBlue is the slope of 2 upper fractals, red the slope of 2 lower fractals. The up/down relation of the lines does not mean a ranking of highs and lows.
Read above and below 0Positive means the newer extreme is higher, negative lower, and 0 the same price. The angle is shown in radians.
Arrows are optionalWhen arrows are enabled, the condition of breaking a line on the price side is shown at the angle's position in the separate window. It is not a trading instruction.
Compares the default settings and a settings change example on a screen with only this product applied.
This is an example to explain the display. M1 on the screen is the timeframe shown when the display example was created and does not show the frequency of actual 1-minute bars. The published images are screens 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 QR. The settings change example is not a recommended value. Details can be checked at full size. Also check the vertical axis and units of the separate window. Except for products with a fixed scale, the scale changes with the settings and display range.
Upper Line Angle is the slope between peaks, and Lower Line Angle the slope between troughs. Blue is not necessarily above red.
0.5 is not 0.5 degrees but 0.5 radians. It is not the slope on screen or a pip value either.
The check is made only after 2 bars to the right of the center have closed. By default, the latest forming bar is empty.
A display that organizes the direction of price movement into updates of peaks and updates of troughs. It does not show price levels or forecast probabilities.
If the center high is strictly higher than each of the 2 bars on either side, it is a peak; if the low is strictly lower than each of them, a trough. Candidates that include equal values are not adopted.
A peak is a shape where the highs step down one by one from the center to both sides, and a trough a shape where the lows step up. Flat sequences are not adopted.
The price difference between the newer and older of the 2 points on the same side × 240 is divided by elapsed seconds ÷ 14400, and its arctan is shown. The price difference is not converted to points.
Even with the same price difference, the absolute value becomes smaller when the elapsed time is longer. Market closure time is also included in the time difference. Do not compare values from symbols with different price levels or digits as strengths on the same scale.
Match the signs of blue and red with the peaks and troughs on the price chart.
Check that the value is updated from 2 bars after the center.
Set Show Cross Arrows to true and check the conditions for the previous bar and the current bar's open.
Changing Fractal Rule changes both the adopted points and the angles. Compare with the same timeframe, history and symbol.
| Included file | Purpose / location |
|---|---|
| TRI_Fractal_Line_Angle.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 7 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.
InpRuleInpArrowsInpClosedBarsOnlyInpTriBrandShowInpTriBrandCornerInpTriBrandXInpTriBrandYValues are used from the time the 2nd bar to the right closes, not from the center of the peak or trough. They are not values that were known at the time of the center bar.
With Closed Bars Only=false, the high and low of the forming bar make fractals form or lapse. Distinguish the latest lines and marks from confirmed values.
In normal updates with the same inputs and the same history, output on closed bars is not changed afterward. Settings changes, additions to or corrections of the history, and reloading trigger recalculation.
Until 2 points are available for peaks and for troughs respectively, the angle on that side is empty. Sometimes only one side is displayed. No trendline is drawn on the price side.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
The default is false. Even when enabled, it requires the strict condition that the open and close of the previous bar straddle the line and the current bar's open is also outside it.
Arrows are decided not by the sign of the angle but by the condition of breaking a line on the price side.
Upper/Lower are the names of the peaks and troughs used. They do not represent the order of the angle values.
Adjust the height and vertical scale of the separate window, and also check the full-size view. Do not judge whether a value exists only from the edge of the display.
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.
A=atan((P2−P1)×240/((T2−T1)/14400)). Time T is in seconds, and P is the price itself. The output is in radians, in the range between −π/2 and π/2. It is not the visual angle that changes with the zoom of the price chart.
The line through the latest 2 points confirmed up to the current bar is extended to the times of the previous bar and the current bar. An up arrow is previous open<upper line, previous close>upper line, current open>upper line; a down arrow is previous open>lower line, previous close<lower line, current open<lower line. Equality does not meet the condition. If the adopted points are updated on the current bar, the previous bar is evaluated with that new line.
buffer 0 is Upper Line Angle (DodgerBlue), 1 is Lower Line Angle (Crimson), 2 is Cross Up (LimeGreen, 233), 3 is Cross Down (Magenta, 234). Line width and arrow width are 2, and empty is EMPTY_VALUE.
The published images and numbers were checked on 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. 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.