MT5 indicators← Adaptive ATR 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

Adaptive ATR

Smooths each bar's "high − low" while changing the length according to how the price advances. Although the name includes ATR, the calculation differs from the standard ATR, which includes gaps from the previous close.

Indicator name: Adaptive ATRMetaTrader 5Separate window below the chart

Read the bar range, not the price direction

Each bar's high − lowGray: schematic of each bar's rangePink: line smoothed with a changing length
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Pink lineThe smoothed value of high − low. The unit is price.

2

The length changesThe averaging length is changed bar by bar based on how the midpoint of the high and low advances.

3

2 valuesThe line's value and the averaging length can also be checked in the Data Window.

Smooths high − lowGaps from the previous close not includedUnit is price
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
Period
InpPeriod
14 → 40

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 settingsInpPeriod = 14
Adaptive ATR default settings
The default period is 14. The pink line in the separate window is the smoothed bar range.
View the screen in detail at full size
Adaptive ATR default settings (full size)
Settings change exampleInpPeriod = 40
Adaptive ATR settings change example
An example with the period changed to 40. The subwindow's automatic scale also changes, so compare the values, not just the height of the line.
View the screen in detail at full size
Adaptive ATR settings change example (full size)

Example shown: 1-minute chart (M1). 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

Read it as a range

A large value means the smoothed high-low range is large. It does not represent a rise or fall of the price.

Check the unit

It is a price value, not pips or points. Read it according to the symbol's number of digits.

Cross-check the length too

The averaging length is not fixed. Check it in the Data Window.

3

What it measures

A calculation that smooths bar ranges. The more efficiently the midpoint of the high and low advances, the longer the averaging length becomes and the more slowly it follows.

Range used as input

Uses each bar's high − low. Even if a bar opens with a gap from the previous close, the width of that gap is not added directly.

Measuring how it advances

The ratio is found by dividing the net movement of the high-low midpoint by the sum of recent movements.

Averaging length

The higher the ratio, the longer it is. For period N, the range is a minimum of max(N÷2,1) and a maximum of 5N. If the sum of movements is 0, it is set to N.

Displayed values

Moves from the previous average toward the bar's high-low range by the coefficient 2÷(1 + averaging length).

4

Situations for reading the display

The line gets larger

Indicator
The smoothed high-low range is getting larger.
Cross-check
Cross-check the candle highs and lows with the line's value.
Check
Compare the values before and after in the Data Window.
Caution
That alone does not mean the price is rising.

The line changes slowly

Indicator
When the averaging length is large, it follows the bar slowly.
Cross-check
Check how the high-low midpoint is advancing.
Check
Read the period and the bar's averaging length separately.
Caution
Being adaptive does not mean it always follows faster.

Gaps do not appear in the line

Indicator
What enters the calculation directly is the bar's high − low.
Cross-check
Separate the distance from the previous close from the bar's range.
Check
Check what this product measures.
Caution
Do not read it as a standard ATR value.
5

Steps for checking the display

1

Apply with the defaults

Check the line in the separate window with Period = 14.

2

Read the value and the length

The line's value is in price units, and the length is a number used in the averaging calculation.

3

Compare settings changes

The change example is 14→40. Compare the values with conditions other than the input kept the same.

4

Distinguish from price direction

Check changes in the range separately from rises and falls of the price.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Adaptive_ATR.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 is 1 input. Change it on the Inputs tab of the properties. The English display name and the input name in the code are shown together.

Period

Name shown on screen
Period
Input name
InpPeriod
Default
14
Allowed range
Integer from 1 to 1000
Description
The base N for measuring the movement of the midpoint price. The averaging length itself changes bar by bar. Default 14, change example shown 40.
8

Usage specifications

First display

The first N bars are hidden, and display starts from bar N+1. With the default of 14 it is the 15th bar, and with the changed example of 40 it is the 41st bar. Even in the hidden section, the internal average needed for later calculations is updated.

Period 1

The shortest setting can also be used. In this case, the lower limit of the average length is 1.

Forming bar

When the forming bar's high or low moves, the range and the average change. It is recalculated when history is added or corrected.

Scale

The upper limit of the separate window adjusts automatically. When comparing setting examples, check the scale and the values.

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

Calculated values are stored in buffers and shown as lines and bars. It does not place trade orders or issue alerts. It does not guarantee profit or market direction.

9

Troubleshooting and usage notes

Nothing is displayed

Check that the history has at least period N + 1 bars. With an out-of-range input it does not start, and 1 line giving the reason in English appears in "Toolbox → Experts". The reason is not shown on the chart.

Does not match the standard ATR

This product adaptively smooths high − low. It does not produce the same values as the standard ATR.

The line is near 0

It may be smoothing a state where the high-low range is small. Check the price unit and the number of displayed digits.

The period was increased

The range of the averaging length and the required number of history bars change. Wait for the update and compare the values.

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

Efficiency ratio and length

Midpoint price M = (H + L) ÷ 2. The efficiency ratio is the net movement from N bars earlier ÷ the sum of |change in M| over the latest N bars, and length = efficiency ratio × (5N − max(N÷2,1)) + max(N÷2,1). N÷2 is a real number. If the denominator is 0, the length is N.

Initial calculation

The high − low of the oldest bar is used as the initial value of the average. Until N earlier bars are available, and on the first bar shown, the net movement is treated as 0; after that, the normal efficiency ratio is used.

Smoothing and display

Average = previous average + 2÷(1 + length) × (bar's high-low range − previous average). MediumVioletRed, solid, width 2. The length is not drawn as a line and is shown as a value.