MT5 indicators← Confirmed Swing Lines and Targets 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

Confirmed Swing Lines and Targets

Draws lines from pairs of confirmed highs and lows, and shows the position where the close first crossed a line and a calculated target level.

Indicator name: Confirmed Swing Lines and TargetsMetaTrader 5Price chart

2 confirmed points → line update → close breaks through

Older highNewer highCalculated targetSupply line after confirmation and the break markThe demand line uses lows, with the calculation reversed up and down
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Look at the lines firstRed is the supply line and blue the demand line. After a peak or trough candidate is confirmed, they are updated with the new pair.

2

Compare the close with the marksThe green up arrow is the first bar that closed above the supply line, and the orange-red down arrow the first bar that closed below the demand line.

3

Targets are reference levelsThe gold and purple dot series are levels calculated from past ranges, not forecasts of being reached or instructions to take profit.

MT5, main chart4 swing point rulesDefault judges on closed bars
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
Swing point selection rule / Swing Point Rule
InpRule
Classic (1 bar each side, above the close 2 bars before) → Level N (N bars before not higher, N bars after lower)
Bars on each side N / Bars On Each Side (Level and Strict rules, 1 to 20)
InpBars
2 → 3

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 settingsInpRule = Classic (1 bar each side, above the close 2 bars before) / InpBars = 2
Confirmed Swing Lines and Targets default settings
The default Classic. The red and blue dot series are lines, green and orange-red are break marks, and gold and purple are targets. When a new pair of dots is adopted, the line and target segments change.
View the screen in detail at full size
Confirmed Swing Lines and Targets default settings (actual size)
Settings change exampleInpRule = Level N (N bars before not higher, N bars after lower) / InpBars = 3
Confirmed Swing Lines and Targets settings change example
An example changed to Level N with 3 bars. Because points are selected over a wider range before and after, the line segments in this screen are longer and there are fewer break marks. The change is not always the same.
View the screen in detail at full size
Confirmed Swing Lines and Targets settings change example (actual size)

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.

2

How to read it in 30 seconds

Red and blue

Crimson is the supply line and DodgerBlue the demand line. They are not smooth continuous lines but series of small dots placed at each bar's price.

Arrow position

Breaks above are LimeGreen and breaks below OrangeRed. Arrows are placed at that bar's line price, not at the high or low.

Once per pair

Within the same pair of points, a mark is placed only on the first break. It is not repeated even if price crosses the line again.

3

What it measures

Measures the order of the swing points' highs and lows and the position of the close relative to the sloped lines extended from them. It is not a function that predicts future price movement.

The 2 points of the supply line

Joins the newest confirmed swing high point with the newest of the older swing high points whose price is strictly higher, and extends the line forward. It does not unconditionally select the previous point.

The 2 points of the demand line

Uses the newest confirmed swing low point and the newest older swing low point whose price is strictly lower. If there is no suitable partner, that side's line is empty.

Delay until confirmation

Classic and Equal Tops are confirmed after the bar 1 bar after the candidate center closes, and Level and Strict after the bar N bars after closes. A point is adopted for the line from the bar after that. Lines and arrows are not added back to the candidate center.

Target updates

Calculated on the break bar, and the same level is kept while the line stays the same. When a new swing point is confirmed and the pair changes, the broken state and the target are reset.

4

Situations for reading the display

The close is above the supply line

Indicator
Red dot series and green arrow
Cross-check
Compare that bar's close with the price of the supply line.
Check
Check whether it is the first break above for the same pair.
Caution
Whether to trade or whether a rise will continue cannot be judged from the arrow alone.

The close is below the demand line

Indicator
Blue dot series and orange-red arrow
Cross-check
Cross-check that bar's close with the demand line.
Check
Check whether it is a section where the lower line is valid.
Caution
The upper and lower lines are independent, so they do not represent a buy or sell position.

There is a line but no arrow

Indicator
Only a red or blue dot series
Cross-check
Look at the position of the line and the close, and whether there is already a mark in the same section.
Check
If it is the latest bar, also check the Closed Bars Only setting.
Caution
Touching the line, or breaking through only with a wick, is different from the close condition.

The target stopped or disappeared

Indicator
Gold or purple dot series
Cross-check
Check Show Targets and whether a new swing point was confirmed.
Check
Read the target as fixed at the time of the break and ended by a change of pair.
Caution
Even if the display continues, it does not show the probability of reaching the target.
5

Steps for checking the display

1

Look at the whole with the defaults

Check the candles, price scale and red and blue dot series on the same chart.

2

Check how points are selected

Check whether it is Classic, Equal Tops which allows runs of equal values, or Level / Strict which use N bars.

3

Separate the times of confirmation and drawing

It waits 1 or N bars from the candidate center, and the line changes from the bar after the confirming bar closes.

4

Look at the break bar

Compare the line price with the close. To avoid the provisional display on the forming bar, keep Closed Bars Only=true.

5

Do not over-rely on targets

A calculated level found from the distance between past lines and prices. Keep checks of operation and display separate from trading decisions.

6

Installation and checking the package contents

Included filePurpose / location
W2C_Confirmed_Swing_Lines_and_Targets.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. When comparing different settings, using separate charts makes checking easier.

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

Swing point selection rule

English item name
Swing Point Rule
Input name
InpRule
Default
Classic (1 bar each side, above the close 2 bars before)
Allowed range
Classic / Equal Tops / Level N / Strict N
Description
Classic adds a comparison with the close 2 bars before to a high strictly higher (or a low strictly lower) than the 1 bar before and after. Equal Tops allows up to 3 equal values on the older side. Level allows equal values on the older side and compares the newer side strictly. Strict compares both sides strictly.

Bars on each side N

English item name
Bars On Each Side (Level and Strict rules, 1 to 20)
Input name
InpBars
Default
2
Allowed range
Integer 1 to 20 (default 2)
Description
Used for judging points only with Level N and Strict N. Classic and Equal Tops confirm 1 bar later, but the input range check of 1 to 20 is done for every rule.

Show targets

English item name
Show Targets
Input name
InpTargets
Default
true
Allowed range
true / false (default true)
Description
With false, the gold and purple targets are hidden. The lines and break marks remain.

Judge breaks on closed bars only

English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false (default true)
Description
Even with true, the line on the latest bar and targets continuing from before are shown, but new breaks and targets on the latest bar are not judged. false uses the close of the forming bar, so marks and targets can change or disappear.

Brand and QR

English item name
Show Trilogy brand and QR code
Input name
InpTriBrandShow
Default
true
Allowed range
true / false
Description
Switches only the display and does not change the calculation.

Brand position

English item name
Brand position (chart corner)
Input name
InpTriBrandCorner
Default
Bottom left
Allowed range
Four corners
Description
The default is bottom left.

Horizontal margin

English item name
Brand horizontal offset (pixels)
Input name
InpTriBrandX
Default
10
Allowed range
Integer (pixels)
Description
Default 10. Negative numbers are treated as 0, and values above 4000 as 4000.

Vertical margin

English item name
Brand vertical offset (pixels)
Input name
InpTriBrandY
Default
10
Allowed range
Integer (pixels)
Description
Default 10. Negative numbers are treated as 0, and values above 4000 as 4000.
8

Usage specifications

Line confirmation and break confirmation

The pair of dots for a line is decided with confirmed data up to before that bar opens. The default break evaluation is made after that bar closes. Read these two time points separately.

Crossing from the previous bar is not required

On the bar where a new line starts to be used, if the close is already outside the line, the first mark appears. It does not require the previous bar to have been inside the line.

Changes to history and settings

Recalculating after adding to or correcting the history, changing the start position or changing settings may change past display. Distinguish this from adding subsequent bars to the same history.

Scope of functions

There are no notifications, emails, automated trading or position management. There are also no arrows pointing at the swing points themselves as peaks or troughs. It is for displaying each line and the breaks and targets.

For on-screen display only

The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.

9

Troubleshooting and usage notes

No lines appear

The number of bars needed for confirmation and the price relationship of the 2 points may not yet be in place. Especially at the start of the history or with a large N, the line is empty until a partner point is found.

Does not load even after setting

Bars On Each Side must be 1 to 20 for every rule. Out of range, loading is refused. Check the explanation starting with Confirmed Swing Lines and Targets: in the log.

Targets cannot be seen

Show Targets may be false, the current line may not yet have been broken, or it may have been reset by a new swing point. Also check the price scale and levels outside the screen.

No mark appears on the latest bar

This is normal with Closed Bars Only=true. Even if there is a line and a target continuing from the past, a new break waits for the bar to close.

Dots are crowded or look thin

Change the width or zoom, and also check the actual-size image. The lines are series of small dots; tell them apart by price and section, not only by color.

The brand overlaps

Adjust the corner position and margin of the brand, or set Show Trilogy brand and QR code to false. The calculation does not change.

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

Exact differences between the 4 swing point types

On the high side, Classic is H[c]>H[c−1], H[c]>H[c+1], H[c]>C[c−2]. Equal Tops is H[c]>H[c+1], with the bar after a run of 0 to 3 equal values on the older side being lower. Level N is N bars on the older side at or below H[c] and N bars on the newer side below H[c]. Strict N is N bars on both sides below H[c]. For lows, the comparisons are reversed.

Line calculation

With the older point a, the newer point b and the current bar t, the high-side supply line is H[a]+(H[b]−H[a])×(t−a)/(b−a). The demand line is calculated the same way with lows. It interpolates by bar number, not by elapsed seconds.

Target calculation

On the bar t of a break above, the bar i with the lowest low from the bar after the older high point a up to t is selected, and supply line[t]+supply line[i]−low[i] is the target. For a break below, the bar i with the highest high from the bar after the older low point up to t is selected, giving demand line[t]+demand line[i]−high[i]. For equal extremes, the newest bar is selected. The break bar itself is included in the range.

Visible outputs

6 series: Supply Line, Demand Line, Break Above Supply, Break Below Demand, Target Above and Target Below. They are calculated levels, not actual trading instructions or results.