MT5 indicators← Range Edge Close Distance 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

Range Edge Close Distance

Weights each bar's distance from the low to the close and from the close to the high by factors such as closeness to the edges of the range over a set period. Shows them as green bars and negative red bars, and a blue line that averages their sum.

Indicator name: Range Edge Close DistanceMetaTrader 5Separate window

Weights the distance within each bar by closeness to the edges of the period range

High and low of each barHighLowCloseDistance → conditions and weights → 2 sets of bars → average line of the sum
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Green barsThe weighted distance from each bar's low to its close is aggregated and drawn above 0.

2

Red barsThe weighted distance from each bar's close to its high is aggregated and drawn as negative values.

3

Blue lineA simple average of the sum of the green and red values. It is not the average of 1 bar.

A different condition from candle colorVolume weighting can be switchedNo notification feature
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
Price range period
InpRangePeriod
20 → 10
Bars for aggregating distance
InpSlowing
3 → 2
Bars for averaging the sum
InpAveragePeriod
3 → 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 settingsInpRangePeriod = 20 / InpSlowing = 3 / InpAveragePeriod = 3
Range Edge Close Distance default settings
Green and red bars may both appear on the same bar. The blue line is an average of their sum.
View the screen in detail at full size
Range Edge Close Distance default settings (full size)
Example of changed settingsInpRangePeriod = 10 / InpSlowing = 2 / InpAveragePeriod = 5
Range Edge Close Distance example of changed settings
Range Period is changed from 20 to 10, Slowing from 3 to 2, and Average Period from 3 to 5. Check not only the changes in the bars and line but also the difference in the vertical axis scale.
View the screen in detail at full size
Range Edge Close Distance 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

Do not mix up top and bottom

Low-Side, which uses the distance from the low to the close, is the green upper bars; High-Side, which uses the distance from the close to the high, is the red lower bars.

Do not read it by candle color

The inclusion conditions are determined by the previous close and the current bar's range, not by whether the open or close is larger.

The line smooths the sum

The blue line contains the result of adding green and negative red. 1 large bar alone does not decide the direction of the line.

3

What it measures

A ratio in which the distance within each bar is weighted by closeness to the edges of the period range and optionally by volume. It is not the price itself or pips.

Builds a price range for each bar

For each bar, finds the highest high and lowest low of the Range Period bars that include that bar. The distances aggregated are that bar's low-to-close and close-to-high.

Conditions for taking distances

Bars whose close is less than "previous close − 0.2 times the current high-low range" are excluded from the lower-edge side. Bars whose close is greater than "previous close + 0.2 times the current high-low range" are excluded from the upper-edge side. Equal values are included.

Weights for position in the range and volume

For Low-Side, the closer the bar's low is to the lowest low of the period, the larger the weight; for High-Side, the closer the bar's high is to the highest high of the period, the larger the weight. If Use Tick Volume is true, the bar's tick volume ÷ the maximum within the period is also multiplied.

Slowing and the average line

The sum of the distances over Slowing bars is divided by the sum of the Range Period ranges calculated for each bar, and multiplied by 100. The upper-edge side is made negative. The blue line is a simple average over Average Period bars of the sum of both sides.

4

Situations for reading the display

Green and red appear at the same time

Indicator
Some bars meet the conditions of both sides.
Cross-check
This is separate from the candle color of the same bar.
Check
Check the height of each of the upper and lower sides.
Caution
Having both sides is not abnormal.

The bars and the line move in opposite directions

Indicator
The blue line is the average of the sum of both sides.
Cross-check
The red value is added as a negative.
Check
Look also at Average Period and the bars on the other side.
Caution
Even if the volume weighting makes the bars smaller, the absolute value of the line does not necessarily become smaller.

There are gaps in the line

Indicator
The calculation window includes bars without a value.
Cross-check
Check for periods with a range of 0 and for insufficient history.
Check
After the bars resume, wait for the average line to become ready.
Caution
Do not read blanks as 0.
5

Steps for checking the display

1

Tell the bars on both sides apart

Check the green lower-edge side and the red upper-edge side.

2

Check the input periods

The 3 types, Range, Slowing and Average, have different roles.

3

Check the volume setting

Check whether tick volume weighting is enabled. It is not a feature that switches to real volume.

4

Read the blue line

Read it as the smoothed result of the sum of both sides.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Range_Edge_Close_Distance.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 are 4 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.

Price range period

English item name
Range Period
Input name
InpRangePeriod
Default
20
Allowed range
Integer 2 to 1000
Description
The number of bars for finding the highest high, lowest low and maximum tick volume.

Bars for aggregating distance

English item name
Slowing
Input name
InpSlowing
Default
3
Allowed range
Integer 1 to 1000
Description
The number of bars over which each bar's distances and range widths are aggregated.

Bars for averaging the sum

English item name
Average Period
Input name
InpAveragePeriod
Default
3
Allowed range
Integer 1 to 1000
Description
Takes a simple average of the sum of green and negative red.

Tick volume weighting

English item name
Use Tick Volume
Input name
InpUseTickVolume
Default
true
Allowed range
true / false
Description
When true, multiplies by the ratio to the maximum tick volume within the period. If the maximum is 0, this weight is 1.
8

Usage specifications

Forming bar

The values and colors of the rightmost bar change while the bar is forming. Past displays are also recalculated when history is added or corrected or settings are changed.

Do not judge blanks by the displayed numbers alone

If the required history is insufficient, lines and bars are not drawn. The 0 in the header alone cannot distinguish a valid 0 from the state before calculation, so check the number of bars and the drawing together.

Required history

The first bar value is at bar Range+Slowing−1, and the average line starts Average−1 bars later. With the defaults, bars start from bar 22 and the line from bar 24.

When the range disappears

If the price range is 0 throughout Range+Slowing−1 bars, the bar is blank. The average line is blank if even 1 bar in its window is blank.

No notifications

This product only displays. The horizontal ±10 are auxiliary scale lines, not levels that direct decisions.

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

Nothing is displayed

Check the required history and the input ranges. With out-of-range inputs, the indicator does not calculate or draw, and the reason appears in English on the MT5 "Experts" tab.

Details are hard to read

Open the full-size display of the comparison image. In the terminal, enlarge the separate window vertically to check the lines and scale.

Little difference even with volume enabled

It is determined by the ratio of each bar's tick volume to the maximum within the period. The difference from false is not always large.

The bars change even at the same price

On the forming bar, tick volume changes in addition to the high, low and close. The displayed values are updated, including the weights and denominator.

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

Outline of the calculation

Let HH be the highest high of the period, LL the lowest low, and H, L and C each bar's high, low and close. Low-Side is (C − L) × (HH − L) ÷ (HH − LL), and High-Side is −(H − C) × (H − LL) ÷ (HH − LL), multiplied by the volume weight if needed. On the side where L = LL or H = HH, the position weight is 1. If the period range is 0, each distance is also 0 and that bar contributes 0. The inclusion conditions and the Slowing aggregation are then applied.

The denominator is the sum of each bar's range

For each of the Slowing bars, the Range Period highest high − lowest low is found, and these are added to form the denominator. It is not a calculation that adds the high-low ranges of the Slowing candles themselves. If the denominator is 0, no value is placed on the bar.

Window and history

As long as the required reference bars and the previous close are the same, there is no smoothing state that depends on how older history starts. On charts with different price ranges or tick volumes, the results also differ.

Heading and unit

The window shows the 3 periods, the volume setting, and the values of the lower-edge side, upper-edge side and average line. The values are distances divided by range widths, not prices or amounts of money. Do not judge whether a value is blank from a 0 rounded to the displayed digits alone.

Bars excluded from aggregation, and volume

Even for bars whose distance was not added because of the conditions, the period range is included in the denominator. With normal highs, lows and closes, at least one side's inclusion condition is met, but if the distance itself is 0, the contribution is also 0. Because the volume weight is 1 or less, switching from false to true under the same bar conditions does not make the absolute value of either set of bars larger. The blue line is the difference of the two sides, so the same relation does not hold for it.

Tick volume and updates while forming

Tick volume differs by broker and symbol. On a forming bar that has a range, whose close is away from the relevant edge and that meets the inclusion condition, the volume weight can increase and that side's bars can change even if the price does not change. When the maximum volume within the period is reached, the weight is 1. The blue line can move up or down. A bar with a range of 0 contributes 0 distance.