MT5 indicators← Swing Level Share product page日本語の取扱説明書

This product is in preparation for release. Product files are not yet distributed; the manual is published so that you can review its content. This manual is an English translation of the Japanese manual. Images (screens and figures) are not translated and may contain Japanese text or earlier names.

For Trilogy users

Swing Level Share

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.

Indicator name: Swing Level ShareMetaTrader 5Separate window

Counts "below the close out of 6" in 2 sets

Blue: 6 lows. Orange: 6 highsClose4 / 6 ≒ 66.67%Equal prices are not counted as "below".Each line is drawn after 6 of its type are available.
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Separate blue and orangeBlue covers the latest 6 swing lows, and orange covers the latest 6 swing highs.

2

Counts only those below the closePrices equal to the close are not included. 0 means all 6 are at or above the close.

3

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.

Equal values are not counted as "below"6 of each are aggregated separatelyThe forming value changes
1

MT5 display and examples of changed settings

Compares the default settings and a settings change example on a screen with only this product applied.

Settings change example: these items are changed
Number of bars in the swing detection window
InpSwingWindow
9 → 5

All other inputs remain at their defaults. On a PC, the default is on the left and the change example on the right; at smartphone width they appear in the same order from top to bottom.

Default settingsInpSwingWindow = 9
Swing Level Share default settings
The default Swing Window is 9. Blue is a thick line and orange a thin line. At equal values, orange overlaps on top of blue.
View the screen in detail at full size
Swing Level Share default settings (full size)
Example of changed settingsInpSwingWindow = 5
Swing Level Share example of changed settings
The Swing Window in the changed example is 5. The range for detecting swings and the point at which they are taken in change. The denominator of the share stays at 6.
View the screen in detail at full size
Swing Level Share example of changed settings (full size)

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.

2

How to read it in 30 seconds

Blue line

The share of the latest 6 swing lows that are below the current close.

Orange line

Makes the same comparison for the latest 6 swing highs.

0 and 100

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.

3

What it measures

Counts the position of the 6 prices relative to the current close, at about 16.67% per 1 item.

Swing lows and highs

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.

Records of 6 each

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.

When it enters the count

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.

7 levels of values

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.

4

Situations for reading the display

0 does not necessarily mean all are above

Indicator
Line with a value of 0
Cross-check
All 6 are at or above the close, including equal prices.
Check
Check the condition that only prices below the close are counted.
Caution
Prices equal to the close are not counted on the lower side.

Only one of the lines appears

Indicator
Start of drawing for blue and orange
Cross-check
The point at which 6 swings of each type are available differs.
Check
Check the number of bars and Swing Window.
Caution
Even with the minimum number of bars, 6 swings are not necessarily available at that number.

The value at the right edge changes

Indicator
Latest bar while forming
Cross-check
In addition to changes in the close, the current high and low can disqualify the center bar candidate.
Check
Read it as a value until that bar closes.
Caution
Do not treat candidates counted while forming as final.
5

Steps for checking the display

1

Check what the 2 lines cover

Blue is swing lows and orange is swing highs. Their thicknesses also differ.

2

Convert the share to a count

1 is about 16.67%, 3 is 50%, and 6 is 100%. Prices equal to the close are not included.

3

Check the window length and delay

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.

4

Check the right edge separately

While forming, the value can change with both the close and the candidates. Read it separately from the values of closed bars.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Swing_Level_Share.ex5The 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.

1

Extract the ZIP

Extract the ex5 main file rather than leaving it in the compressed file.

2

Open the data folder

In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.

3

Apply this product

Refresh the Navigator or restart MT5, and apply it to the target chart. Place only 1 instance of the same product on 1 chart.

4

Check the settings and display

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.

7

Settings

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.

Number of bars in the swing detection window

English item name
Swing Window
Input name
InpSwingWindow
Default
9
Allowed range
Integer 3 to 1000
Description
The number of bars used to judge the high and low at the center of the window. Default 9. The number of items used for the share is always 6, separate from this input.
8

Usage specifications

Even-numbered windows

The 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.

Start of drawing

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.

Updates on the forming bar

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.

Display range

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.

Line overlap and header

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.

Notifications

This product has no notification or mark functions.

Only 1 instance of the same product on 1 chart

This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.

For on-screen display only

Displays, marks and notifications are records of calculation results. They do not direct trading decisions and do not guarantee future price movements.

9

Troubleshooting and usage notes

The line does not appear yet

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.

The heading shows 0.00

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.

Only 1 line seems to be visible

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.

Out-of-range input

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.

10

Technical information and specification details

Formula for the share

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".

Window comparison

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.

Time correspondence

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.

Handling of history

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.