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
Base Distance Levels
Displays up to 8 sets of lines at distances specified in points, based on a moving average or the price of the previous session.
Indicator name: Base Distance LevelsMetaTrader 5Displays levels on the price chart
Choose a base price → specify distances in points → up to 8 sets above and below
Schematic diagram of how to read it. This is not an actual terminal screen.
1
Gray base lineSelect from MA, previous close, previous pivot, or session open.
2
Upper and lower distance linesGreen is base + distance, red is base − distance.
3
0 means hiddenSetting a Distance to 0 hides that 1 set of upper and lower lines.
MT5 onlyCalculated display based on the settingsNo notifications or orders
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
Base price / Base InpBaseMoving Average → Previous Session Pivot (H+L+C)/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.
An example showing 3 sets at 20, 40 and 55 points based on the previous session's pivot.View the screen in detail at full size
Example shown: 1-minute chart (M1). This is an example for explaining the display. 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
Gray base line
Select from MA, previous close, previous pivot, or session open.
Upper and lower distance lines
Green is base + distance, red is base − distance.
0 means hidden
Setting a Distance to 0 hides that 1 set of upper and lower lines.
3
What it measures
Displays up to 8 sets of lines at distances specified in points, based on a moving average or the price of the previous session.
Distances are in fixed units
Each Distance is a number of points. These lines do not widen automatically with the range or volatility.
MA base
Averages the close using SMA, EMA, SMMA or LWMA. Enabling MA of the Previous Bar uses the average of 1 bar earlier.
Session base
With Previous Session Close, Previous Session Pivot and Session Open, the base changes at session boundaries in server time. There is no option to make it follow the current price.
4
Situations for reading the display
Gray base line
Indicator
Select from MA, previous close, previous pivot, or session open.
Cross-check
Cross-check the settings against the corresponding parts of the published screen.
Check
Each Distance is a number of points. These lines do not widen automatically with the range or volatility.
Caution
This is not a display that instructs trades based only on colors or on levels being reached or crossed.
Upper and lower distance lines
Indicator
Green is base + distance, red is base − distance.
Cross-check
Cross-check the settings against the corresponding parts of the published screen.
Check
Averages the close using SMA, EMA, SMMA or LWMA. Enabling MA of the Previous Bar uses the average of 1 bar earlier.
Caution
This is not a display that instructs trades based only on colors or on levels being reached or crossed.
0 means hidden
Indicator
Setting a Distance to 0 hides that 1 set of upper and lower lines.
Cross-check
Cross-check the settings against the corresponding parts of the published screen.
Check
With Previous Session Close, Previous Session Pivot and Session Open, the base changes at session boundaries in server time. There is no option to make it follow the current price.
Caution
This is not a display that instructs trades based only on colors or on levels being reached or crossed.
5
Steps for checking the display
1
Check the base
Each Distance is a number of points. These lines do not widen automatically with the range or volatility.
2
Align the settings
Check the settings list below in the input fields of the properties. Do not confuse periods, times and units.
3
Load the required history
SMA, SMMA and LWMA need the bars for the period, and EMA starts from the oldest price. Using the previous bar requires 1 more bar. Session Open is shown from period 2, and the previous period's close and pivot from period 3.
4
Read the screen and values
Match the diagram, the actual screen and the price scale. Also check for lines off the screen and overlapping lines.
6
Installation and checking the package contents
Included file
Purpose / location
TRI_Base_Distance_Levels.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.
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 14 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.
Base price
English item name
Base
Input name
InpBase
Default
Moving Average
Allowed range
Moving Average / Previous Session Close / Previous Session Pivot / Session Open
Description
Select from MA, previous session close, previous session (H+L+C)/3, or session open.
MA period
English item name
MA Period
Input name
InpMAPeriod
Default
157
Allowed range
Integer from 1 to 1000
Description
The number of closes used for the MA base.
MA method
English item name
MA Method
Input name
InpMAMethod
Default
SMA
Allowed range
SMA / EMA / SMMA / LWMA
Description
Affects only the MA base.
MA of 1 bar earlier
English item name
MA of the Previous Bar
Input name
InpMAPrevBar
Default
false
Allowed range
true / false
Description
For the MA base, uses the average of 1 bar before each bar.
Boundary hour
English item name
Session Start Hour
Input name
InpSessionStartHour
Default
0
Allowed range
Integer from 0 to 23
Description
Specifies the boundary hour in server time. It is not necessarily Japan time.
Boundary minute
English item name
Session Start Minute
Input name
InpSessionStartMinute
Default
0
Allowed range
Integer from 0 to 59
Description
The boundary minute. Specify it together with the hour.
Distance 1
English item name
Distance 1 (points, 0 = off)
Input name
InpDist1
Default
23
Allowed range
Integer from 0 to 100000
Description
Adds and subtracts the same number of points above and below the base. At 0, this 1 set is hidden.
Distance 2
English item name
Distance 2 (points, 0 = off)
Input name
InpDist2
Default
38
Allowed range
Integer from 0 to 100000
Description
Adds and subtracts the same number of points above and below the base. At 0, this 1 set is hidden.
Distance 3
English item name
Distance 3 (points, 0 = off)
Input name
InpDist3
Default
50
Allowed range
Integer from 0 to 100000
Description
Adds and subtracts the same number of points above and below the base. At 0, this 1 set is hidden.
Distance 4
English item name
Distance 4 (points, 0 = off)
Input name
InpDist4
Default
61
Allowed range
Integer from 0 to 100000
Description
Adds and subtracts the same number of points above and below the base. At 0, this 1 set is hidden.
Distance 5
English item name
Distance 5 (points, 0 = off)
Input name
InpDist5
Default
100
Allowed range
Integer from 0 to 100000
Description
Adds and subtracts the same number of points above and below the base. At 0, this 1 set is hidden.
Distance 6
English item name
Distance 6 (points, 0 = off)
Input name
InpDist6
Default
0
Allowed range
Integer from 0 to 100000
Description
Adds and subtracts the same number of points above and below the base. At 0, this 1 set is hidden.
Distance 7
English item name
Distance 7 (points, 0 = off)
Input name
InpDist7
Default
0
Allowed range
Integer from 0 to 100000
Description
Adds and subtracts the same number of points above and below the base. At 0, this 1 set is hidden.
Distance 8
English item name
Distance 8 (points, 0 = off)
Input name
InpDist8
Default
0
Allowed range
Integer from 0 to 100000
Description
Adds and subtracts the same number of points above and below the base. At 0, this 1 set is hidden.
8
Usage specifications
Preparing the base
SMA, SMMA and LWMA need the bars for the period, and EMA starts from the oldest price. Using the previous bar requires 1 more bar. Session Open is shown from period 2, and the previous period's close and pivot from period 3.
Handling of periods
Day boundaries use the terminal server time. If the start time is noon or later, the time after that start is treated as belonging to the next business day. Saturdays and Sundays do not start a new period and are merged into the preceding period. The partial first period is not used as a completed reference period. Bases other than MA require D1 or lower; on D1 the start is 00:00.
Use it as a separate product
Unlike tools that place objects at prices, it draws lines that hold a calculated value on each bar. It does not replace the files of the older product.
Latest bar and history
The forming bar may change with price updates. Past calculation results may also change with history additions or corrections or settings changes.
MT5 only
No account authentication or license file is required. There are no sound, notification or order functions. An MT4 version is not included.
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
Not visible even after changing the distance
At 0 it is hidden. Lines are also not visible before the base calculation starts or outside the price range.
Lines curve or form steps
The MA base moves along the average, and the session base changes in steps at the boundaries.
The same distance was entered
Lines with the same number of points overlap. It may look as if there are fewer lines.
The display stopped
Check the price feed, terminal connection, history loading and input ranges. Not being displayed does not necessarily mean a malfunction.
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
Distance formula
For base B and distance d, Upper=B+d×point and Lower=B−d×point. Up to 8 sets plus the base line make 17 lines.
How the MA starts
SMA is the simple average of the latest P bars; LWMA uses weights 1 to P from oldest to newest. EMA updates from the oldest close with coefficient 2/(P+1). SMMA starts from the average of the first P bars and then updates as (previous value×(P−1)+close)/P.