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

ATR With MA

Compares the blue ATR and the orange-red ATR average line in the same window. If needed, the difference between the 2 lines can be shown as gray bars. What is compared is the range of price movement, not the up or down direction of price.

Indicator name: ATR With MAMetaTrader 5Separate window

True range → ATR → ATR average and difference

True range TR → blue ATRAverage the blue ATR again → orange-red lineOptional display: ATR − average line → gray barsWith an average period of 0, neither the average line nor the difference bars are drawn
Schematic diagram of how to read it. This is not an actual terminal screen.
1

BlueATR, the true range averaged with the selected method.

2

Orange-redA line that averages the ATR again. It is not a price average.

3

Gray barsATR − average line, when the display is enabled.

Bars are not shown by defaultAverage period 0 shows only the blue lineDistinguish 0 in the heading from a calculated 0
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
ATR period
InpATRPeriod
30 → 112
ATR method
InpATRMethod
Simple (SMA) → Smoothed (SMMA)
ATR average line period
InpMAPeriod
20 → 109
ATR average line method
InpMAMethod
Simple (SMA) → Smoothed (SMMA)
Show difference bars
InpShowHistogram
false → true

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 settingsInpATRPeriod = 30 / InpATRMethod = Simple (SMA) / InpMAPeriod = 20 / InpMAMethod = Simple (SMA) / InpShowHistogram = false
ATR With MA default settings
ATR is SMA30 and the average line is SMA20. The first 0.00000 in the header is the field for the hidden difference; it does not mean the difference is 0.
View the screen in detail at full size
ATR With MA default settings (full size)
Settings change exampleInpATRPeriod = 112 / InpATRMethod = Smoothed (SMMA) / InpMAPeriod = 109 / InpMAMethod = Smoothed (SMMA) / InpShowHistogram = true
ATR With MA settings change example
ATR changed to SMMA 112 and the average to SMMA 109, with the difference bars shown. The shared vertical axis extends down to around 0, and the 2 lines are pushed toward the top.
View the screen in detail at full size
ATR With MA 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. The vertical axis of the separate window is adjusted automatically for each image, so do not compare values by on-screen height alone.

2

How to read it in 30 seconds

Which of the 2 lines is higher

Check whether ATR is larger or smaller than its own average.

Bars

Above 0, ATR is larger; below 0, it is smaller.

Method

The ATR averaging method and the ATR average line method are selected separately.

3

What it measures

Read the price range itself separately from its deviation from its recent average.

Average of TR

Averages the true range, which includes the previous close as well as the high and low.

Average of ATR

The MA line is the average of the blue ATR. It is not a price MA.

Difference

Gray bars=ATR−ATR MA. By default, the bars of the calculated result are not drawn.

Unit

The 2 lines and the difference are in the same units as price. They are not values converted to ratios or pips.

4

Situations for reading the display

Blue is above orange-red

Indicator
The current ATR is larger than its average.
Cross-check
Compare the 2 lines at the same time.
Check
Check the averaging method and period.
Caution
This is separate from the direction of price.

Lines look flat when the bars are shown

Indicator
The lines and the difference near 0 share the same vertical axis.
Cross-check
Also look at the scale and the numbers.
Check
Do not compare only by height between the original image and the changed image.
Caution
Separate a change in display scale from a change in values.
5

Steps for checking the display

1

Check the defaults

Read from the 2 lines, blue and orange-red.

2

Show the bars if needed

Set Show Difference Histogram to true.

3

To remove the average

Setting ATR MA Period to 0 removes the average line and the bars.

6

Installation and checking the package contents

Included filePurpose / location
TRI_ATR_With_MA.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 5 inputs. Change them on the Inputs tab of the properties. The English display name and the input name in the code are shown together.

ATR period

Name shown on screen
ATR Period
Input name
InpATRPeriod
Default
30
Allowed range
1–1000 bars
Description
Period over which TR is averaged.

ATR method

Name shown on screen
ATR Method
Input name
InpATRMethod
Default
Simple (SMA)
Allowed range
SMA / EMA / SMMA / LWMA
Description
SMA is a simple average. Other methods are averages that differ from the standard ATR.

ATR average line period

Name shown on screen
ATR MA Period
Input name
InpMAPeriod
Default
20
Allowed range
0 to 1000 bars
Description
0 hides the ATR average line and the difference bars.

ATR average line method

Name shown on screen
ATR MA Method
Input name
InpMAMethod
Default
Simple (SMA)
Allowed range
SMA / EMA / SMMA / LWMA
Description
Method used to average the blue ATR again.

Show difference bars

Name shown on screen
Show Difference Histogram
Input name
InpShowHistogram
Default
false
Allowed range
true / false
Description
true shows ATR−ATR MA. With an average period of 0, no bars appear even if true.
8

Usage specifications

Forming bar

Values and drawing change with the latest bar's high, low and close. They are also recalculated when history is added or corrected or settings change.

Conditions for comparison

Compare with the same symbol, timeframe, period and loaded history. The display is not a forecast of future prices.

Starting position

By default, ATR can be calculated from the 30th bar, and the average line and difference from the 49th bar. EMA starts from the first value of the input series; the other methods need the specified number of bars.

The 0 in the header

The default header is in the order difference, ATR, ATR MA, and the hidden difference appears as 0. Do not use the hidden value to judge that the difference is zero.

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

This product shows calculation results through plot buffers and does not place orders. It does not guarantee profit or future price movement.

9

Troubleshooting and usage notes

The histogram does not appear

Check the display switch and ATR MA Period. With period 0, it does not appear even if the display switch is true.

Values are small

Values are shown in price units. Check the decimal places and the vertical axis, and do not regard a value such as 0.0001 as abnormal.

Nothing is shown after entering inputs

Check the allowed range of the inputs and the number of history bars. Outside the range, the indicator does not start, and the reason is shown in English in the Experts tab of the Toolbox. No explanation is shown on the chart.

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

Formulas

ATR=MA method(TR,N). ATR MA=other MA method(ATR,M). Diff=ATR−ATR MA. For TR, the oldest bar uses H−L, and after that max(H,previous C)−min(L,previous C).

Averaging method

SMA uses equal weights, LWMA gives more weight to newer values, the EMA coefficient is 2/(N+1), and SMMA uses 1/N. SMMA uses the simple average of the first N values as the seed.

Distinction from the standard ATR

ATR Method=SMA uses the same simple-average formula as the MT5 standard ATR. EMA, SMMA and LWMA are not treated as equivalent to the standard ATR.