What to look at
Marks selected by an extreme-value update in the recent period and the high/low conditions after it.
Finds the position held after the lowest low or highest high in the period was updated, and shows turn marks and the midline of the range using conditions up to the previous closed bar. Marks are not moved back to past candidates; they are placed on the bar after the judgment.
Blue up and red downBlue is a mark that met the low-side conditions, and red the high-side conditions.
Light blue and orange-red linesThe midpoint of the highest high and lowest low from each low-side or high-side candidate up to the previous bar.
Also appears on the latest barThe values of the latest bar itself are not used; the output is decided from data up to the previous closed 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.
Marks selected by an extreme-value update in the recent period and the high/low conditions after it.
The midpoint of the highest high and lowest low of the range from the candidate to the previous bar. It is not a moving average or a fixed target price.
It appears on the next bar after the required conditions are met up to the previous bar. It does not necessarily appear a fixed number of bars after the candidate.
The low side and the high side are tracked separately, and the candidate, mark and line display periods are handled separately.
Looks for a shape where the lowest low in the period falls and the next bar keeps the same lowest low. Of those that can be confirmed up to the previous bar, the newest candidate is used.
Appears when the low of the previous bar is strictly higher than the lowest low of the 3 bars before it, and there is no low-side mark yet since the candidate. The high side uses the opposite comparison.
Adds the highest high and lowest low from the candidate to the previous bar and divides by 2. When the range widens, the price of the line can change.
While there is no mark yet, the line is shown. After a mark appears, it is shown up to the set number of bars and then left blank. When a new candidate is selected, the range is revised.
With the default period 8 and line 8 bars, check the blue and red marks and the light blue and orange-red lines.
Check the update of the lowest low or highest high in the period and the shape held on the next bar.
Check the previous closed bar, not the latest bar, and the highs and lows of the 3 bars before it.
On a separate chart, change only Line Bars. Even at 0, the line appears before the mark and on the mark bar.
| Included file | Purpose / location |
|---|---|
| TRI_Swing_Turn_Midline.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.
InpPeriodInpLineBarsInpTriBrandShowInpTriBrandCornerInpTriBrandXInpTriBrandYThe value of output bar t is decided using data up to t−1. If the history and settings are the same, its mark and line do not change merely because the high or low of t moves. There is no Closed Bars Only input.
The line visualizes the midpoint of the range. It is not a function for automatic orders, take profit, stop loss or notifications.
The low side and the high side are calculated independently. There is no rule that they always alternate.
The case where only subsequent bars increase with the same history and the same settings is different from filling in or correcting the history or changing the loading start position. In recalculation with changed history or settings, past display may also change.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
Check whether there is enough history for the required number of bars and whether there are candidates that meet the conditions. Widen the visible range and look at earlier bars as well.
Adjust the margin of the price scale and the visible range. Because a mark places a past candidate price on a later bar, it can be far from the current candle.
A mark is placed on the bar where the conditions can be confirmed. Marks are not moved back afterwards to the bar of the past peak or trough.
Output checking starts at t=P+2, counted from the oldest side. At least P+3 bars are needed, and if there is still no candidate after that, neither the line nor the marks appear.
Range Period is an integer from 2 to 500 and Line Bars from 0 to 500. Out of range, the calculation does not start.
The midline's calculation range extends from the candidate to the previous bar. If the range's high or low changes, the midpoint also moves.
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 LL be the lowest low of the most recent P bars. Search from t−1 toward older bars, and from the first j where LL[j−2]>LL[j−1] and LL[j−1]=LL[j], select b=j−1. Only the range of history that can be calculated is used. The high side reverses the comparison of HH.
If there is no mark of the same side in b to t−1 and min(low[t−4..t−2])<low[t−1], low[b] is placed on bar t. The high side places high[b] when max(high[t−4..t−2])>high[t−1]. No distance is added.
Let s be the bar of the first mark of the same side from candidate b to t−1. The line is shown if there is no s or if t−s≤Line Bars. The value is the midpoint of the highest high and lowest low of the same range.
It does not move marks back to past bottoms or tops, offset them 5 points from the candidate price, or place a separate waiting point. When there is no candidate, the previous bar is not used in its place; the line and the marks are left blank.