MT5 indicators← Price Distance Lines 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

Price Distance Lines

Draws 2 horizontal lines each above and below the close of the current chart bar, at a near distance and a far distance. All 4 are guide lines that move when the price moves; they are not fixed stop-loss or take-profit prices.

Indicator name: Price Distance LinesMetaTrader 5Main chart

Start from the price → set the distances in points → look at the 4 lines above and below

+300 point+100 pointReference price−100 point−300 pointWhen the price moves, all 4 lines move
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Near linesPrice ± Near Distance × point. Default is 100 points.

2

Far linesPrice ± Far Distance × point. Default is 300 points.

3

Follows the priceWhen the reference price moves, the lines move in the same direction. The upper and lower sides are not predicted directions.

Unit is pointSymmetrical above and belowNo orders or alerts
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
Far-side distance
InpFarPoints
300 → 600
Near-side distance
InpNearPoints
100 → 200

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 settingsInpFarPoints = 300 / InpNearPoints = 100
Price Distance Lines default settings
An example showing 100 point and 300 point above and below.
View the screen in detail at full size
Price Distance Lines default settings (full size)
Settings change exampleInpFarPoints = 600 / InpNearPoints = 200
Price Distance Lines settings change example
Near is changed to 200 and Far to 600 points. The spacing above and below is wider.
View the screen in detail at full size
Price Distance Lines settings change example (full size)

Example shown: 15-minute chart (M15). This is an example to explain the display. The settings change example is not a recommended value. Details can be checked in the full-size view.

2

How to read it in 30 seconds

Check the point

300 points is not 300 pips. Check the size of the symbol's point.

Not fixed lines

The price positions of the 4 lines are also updated as the price changes.

Separate the roles

Use it to visualize distances. Manage order prices separately.

3

What it measures

Shows distances of the specified number of points above and below the current price.

Base price

Reads the close of the current chart bar. The lines are distances above and below that price; they do not start from the current day's open or the entry price.

Point conversion examples

For a symbol whose point is 0.00001, 300 points = 0.00300 and 100 points = 0.00100. If the point is 0.01, 300 points = 3.00. Do not enter values by substituting the definition of a pip.

Number of lines

The basic layout is 2 lines each above and below. With the same distances they overlap, and with 0 they overlap the reference price, so the number of visible lines can decrease.

4

When to use it in decisions

Wanting to see a fixed distance

Indicator
Near and far lines above and below
Price
Look at the spacing from the current price
Consideration
Grasp the size of the distance you have in mind
Exclusion condition
Do not treat the lines themselves as support or resistance

The price moved

Indicator
The 4 lines also move
Price
Read the lines' price scale again
Consideration
Measure again from the current reference
Exclusion condition
Do not confuse earlier line positions with current order prices

Only 2 lines are visible

Indicator
The near and far distances are the same
Price
They overlap at the same price position
Consideration
Check the two settings
Exclusion condition
Do not read the reduced number of lines as a trading signal

The lines are off screen

Indicator
The distance is large
Price
The displayed price range is narrow
Consideration
Adjust the vertical axis or reduce the distance
Exclusion condition
Do not conclude that lines not on screen have been deleted
5

Actual decision steps

1

Know the symbol's point

Check the price scale and the size of the point.

2

Set the two distances

Initially Near is 100 and Far is 300. Both are in points.

3

Read above and below as pairs

Distinguish the near and far lines by color and line style.

4

Check the price update

After the price moves, read the new line positions. Keep them separate from order settings.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Price_Distance_Lines.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'.

This product does not require DLL permission or enabling automated trading. When removed, this product's drawings are cleared.

7

Settings

There are 6 inputs. Change them on the Inputs tab of the properties. The English display name and the input name in the code are shown together.

Far-side distance

Name shown on screen
Far Distance (points)
Input name
InpFarPoints
Default
300
Allowed range
Integer from 0 to 100000, in points
Description
Distance placed above and below the price. It is not automatically forced to be larger than Near.

Near-side distance

Name shown on screen
Near Distance (points)
Input name
InpNearPoints
Default
100
Allowed range
Integer from 0 to 100000, in points
Description
Distance placed above and below the price. With 0, the upper and lower lines overlap the current price.

Far-side color

Name shown on screen
Far Line Color
Input name
InpFarColor
Default
SlateGray
Allowed range
Select a color
Description
Color of the 2 far-side lines above and below. Default is SlateGray.

Near-side color

Name shown on screen
Near Line Color
Input name
InpNearColor
Default
SlateGray
Allowed range
Select a color
Description
Color of the 2 near-side lines above and below. Default is SlateGray.

Far-side line style

Name shown on screen
Far Line Style
Input name
InpFarStyle
Default
STYLE_DASHDOTDOT
Allowed range
Select a line style
Description
The default is STYLE_DASHDOTDOT (dash-dot-dot). Solid, dashed, dotted, dash-dot and other styles can be selected.

Near-side line style

Name shown on screen
Near Line Style
Input name
InpNearStyle
Default
STYLE_DOT
Allowed range
Select a line style
Description
The default is STYLE_DOT (dotted). The line width is 1.
8

Usage specifications

Order of Near and Far

Although the names mean near and far, the input values are not automatically reordered by size. If Near is set larger than Far, the names and the visual inner/outer positions are reversed.

Price feed and history

The lines are updated when the chart bar's price can be obtained. While it cannot be obtained, earlier lines may remain. Do not mistake lines during market closure for new prices.

Difference from orders

The lines are on-screen objects; they do not place or modify Stop Loss or Take Profit. They do not send notifications either.

Only 1 instance of the same product on 1 chart

If you add the same product to the same chart more than once, the drawings overwrite each other, or deleting one also removes the display of the other. To use different settings at the same time, use separate charts.

For on-screen display only

It has no value buffers and shows its output as lines and text on the chart. It does not place trade orders or issue alerts. It does not guarantee profit or market direction.

9

Troubleshooting and usage notes

The distance differs from what you expected

Check for confusion between points and pips. For 5-digit FX and similar, if 1 pip = 10 points, 300 points is 30 pips.

Lines overlap

Check whether Near and Far are equal or set to 0.

Wanting to move the lines and fix them

This product is a distance guide that follows the price. Manage fixed order prices and manual horizontal lines separately.

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

Placement formula

Far upper = price + Far × point, Far lower = price − Far × point. Near uses the same formula. The price is the close of the current chart bar.

Drawing and updates

4 horizontal lines, line width 1. There are no output buffers. They move on price updates, and are also redrawn by a timer when waiting for data or when lines are missing.