Blue line
The share of the latest 6 swing lows that are below the current close.
For the latest 6 swing lows and swing highs, draws as separate lines the share of them that are below the close. The 2 lines both take 7 levels of values from 0 to 100.
Separate blue and orangeBlue covers the latest 6 swing lows, and orange covers the latest 6 swing highs.
Counts only those below the closePrices equal to the close are not included. 0 means all 6 are at or above the close.
Enters the count with a delayThe center bar is examined from the latest bar of the window, and the result is reflected in the line at that point.
Compares the default settings and a settings change example on a screen with only this product applied.
Published example: M1. This is an example to explain the display. The example with changed settings is not a set of recommended values. Details can be checked in the actual-size view. 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 the displayed range.
The share of the latest 6 swing lows that are below the current close.
Makes the same comparison for the latest 6 swing highs.
0 means all 6 are at or above the close, and 100 means all 6 are below the close. No other meaning is added to line crossings or end values.
Counts the position of the 6 prices relative to the current close, at about 16.67% per 1 item.
In a window of Swing Window bars, if the low of the center bar equals the lowest low in the window, it is a swing low. Highs are checked the same way against the highest high. It is counted even if other bars have the same price.
Keeps 6 lows and 6 highs each, newest first. The same price can enter more than once, and the same bar can enter both. It is not a process that merges duplicate prices into 1.
With the default of 9 bars, it enters the count from the calculation of the latest bar of the window, 4 bars after the center bar. The share is drawn on that latest bar, so the line is not placed back at the time of the center bar.
0, about 16.67, about 33.33, 50, about 66.67, about 83.33 and 100. If all 6 have the same price, the value is 0 or 100 depending on the relation to the close.
Blue is swing lows and orange is swing highs. Their thicknesses also differ.
1 is about 16.67%, 3 is 50%, and 6 is 100%. Prices equal to the close are not included.
With the default of 9, counting starts from the calculation 4 bars after the center; with the changed example of 5, from 2 bars after.
While forming, the value can change with both the close and the candidates. Read it separately from the values of closed bars.
| Included file | Purpose / location |
|---|---|
| TRI_Swing_Level_Share.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. Place only 1 instance of the same product on 1 chart.
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 is 1 input. Change it on the Inputs tab of the properties. The English item name and input name defined in the source are shown together.
InpSwingWindowThe center is the position (Swing Window−1)÷2 bars back from the latest bar, rounded down. For 8 bars, there are 3 on the newer side and 4 on the older side, so the older side has 1 more bar.
Each line is not drawn until 6 values have accumulated. At the earliest it starts from bar Swing Window+5, and in practice later depending on the price data. With large periods, one of the lines may not accumulate enough values.
When the close moves, the comparison results change. Also, updates to the high or low of the latest bar may drop the center bar as a candidate during the bar. The value for that bar is fixed when the bar closes.
Values are 0 to 100, but the vertical axis is −5 to 105 including margins. There are no level lines. Do not read the −5/105 margin as the range of calculated values.
At equal values the thin orange line overlaps on top of the thick blue line. The header at the top left may also hide lines near 100. The window name shows the period, and the following 2 values are shown in the order blue, orange, with 2 decimal places.
This product has no notification or mark functions.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
Displays, marks and notifications are records of calculation results. They do not direct trading decisions and do not guarantee future price movements.
Beyond the number of bars in the window, enough history is needed for 6 of that type to be available. Load the bars and check the period. If the 2 lines start at different points, that is due to how the calculation works.
0.00 can appear even while the line is not drawn. It looks the same as a valid 0.00, so check whether the relevant line is drawn.
Check separately for overlap at equal values and for one line not yet being ready. Look also at the line thickness and the window heading.
If the Experts tab shows Swing Level Share: Swing Window must be 3 to 1000., return Swing Window to within the 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.
With k as the number of prices in each set of 6 that are at or above the close, 100 × (1 − k ÷ 6) is drawn. Therefore prices equal to the close are not included in "below".
Finds the lowest low and highest high of the Swing Window bars including the latest, and compares them with the bar floor((Swing Window − 1) ÷ 2) bars before the latest. Because matches are included, the same price can be recorded several times.
Counting starts from the calculation of the latest bar of the window, not the center bar where the swing candidate is. If the latest bar is forming, both the candidate and the share can change. The calculation does not add values back at past center positions from later bars.
Each bar carries over the records of 6 from the previous bar and takes in new candidates. Drawing starts only when 6 of that type are available. If you change the history or period, also check where drawing starts.