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

Overlays an orange stepped line, which holds back small 1-bar changes, on a blue adaptive moving average (AMA). What is compared is the amount of AMA change, not the distance between price and the stepped line.

Indicator name: Adaptive MA StepMetaTrader 5Main chart

If the AMA change is small, the previous step is kept

Price → adaptive moving average AMA (blue dotted line)Compare the 1-bar change with the recent average changeBelow the threshold: hold / otherwise: move to AMAIt is not a mechanism that updates based on distance from the step
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Blue dotted lineThe AMA before filtering. It can be hidden with Show AMA.

2

Orange stepsSmall changes are held back, and on a bar that meets the condition the line moves to the current AMA.

3

When they overlapWhile the hold condition is not met, orange and blue overlap.

Compared against the 1-bar AMA changeThe step is not the price itselfUpdated on the forming bar
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
Efficiency ratio period
InpPeriod
10 → 160
Fast coefficient period
InpFastPeriod
2 → 3
Slow coefficient period
InpSlowPeriod
30 → 100
Hold ratio
InpFilterPercent
50 → 25
Bars to average the change
InpFilterBars
30 → 100

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 = 10 / InpFastPeriod = 2 / InpSlowPeriod = 30 / InpFilterPercent = 50 / InpFilterBars = 30
Adaptive MA Step default settings
You can compare the blue dotted line with the orange steps. In some places the orange line stays flat.
View the screen in detail at full size
Adaptive MA Step default settings (actual size)
Settings change exampleInpPeriod = 160 / InpFastPeriod = 3 / InpSlowPeriod = 100 / InpFilterPercent = 25 / InpFilterBars = 100
Adaptive MA Step settings change example
AMA changed to 160/3/100 and the filter to 25% and 100 bars. In this stretch of bars the 2 lines almost overlap.
View the screen in detail at full size
Adaptive MA Step settings change example (actual 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

Use blue as the reference

Read how much the AMA changed from 1 bar earlier.

Look at the orange hold

If the change is below the threshold, orange stays at its previous value.

Compare the images correctly

The overlap in the change example is not a disappearance. It can be checked at actual size.

3

What it measures

By not reflecting small AMA changes in the stepped line, it shows continuous lines and holding stretches separately.

AMA movement

Changes the tracking coefficient based on the ratio of the net price change to the sum of the changes along the way.

Filter threshold

Multiplies the average absolute AMA change over the last W bars by Filter Percent/100. The current change is included.

Step update

If the absolute value of the current AMA change is below the threshold, the previous step is kept. Otherwise, the current AMA is used.

Threshold 0

With Filter Percent=0, the hold condition is never met, and the step follows the AMA.

4

Situations for reading the display

Only orange is horizontal

Indicator
The AMA change is smaller than the threshold.
Cross-check
Check the 1-bar change of blue.
Check
Distinguish stalled price from a held step.
Caution
The distance of price from orange is not used for the decision.

The 2 lines overlap

Indicator
If the hold condition is not met, the step value is the same as the AMA.
Cross-check
Check Filter Percent and Filter Bars.
Check
View it at actual size so as not to mistake it for a missing line.
Caution
Changing settings does not necessarily make the steps stand out.
5

Steps for checking the display

1

View the 2 lines with default values

Tell apart the blue dotted line and the orange line.

2

Compare the horizontal parts

Look at the hold relative to the AMA changes before and after.

3

Change only the filter

Do not mix it with changes to the AMA period; separate the effects of Percent and Bars.

6

Installation and checking the package contents

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

Efficiency ratio period

Name shown on screen
Efficiency Period
Input name
InpPeriod
Default
10
Allowed range
1–500 bars
Description
Number of bars n used for the AMA efficiency ratio.

Fast coefficient period

Name shown on screen
Fast Period
Input name
InpFastPeriod
Default
2
Allowed range
1–500 bars
Description
Smoothing coefficient for the high efficiency ratio side. Being smaller than Slow is not a required condition.

Slow coefficient period

Name shown on screen
Slow Period
Input name
InpSlowPeriod
Default
30
Allowed range
1–500 bars
Description
Smoothing coefficient for the low efficiency ratio side.

Smoothing coefficient exponent

Name shown on screen
Smoothing Power
Input name
InpPower
Default
2
Allowed range
0.1〜10
Description
The interpolated coefficient is raised to this power. 2 gives the same form as the standard AMA.

Price

Name shown on screen
Applied Price
Input name
InpPrice
Default
Close
Allowed range
7 applied prices
Description
Price used to calculate the AMA.

Hold ratio

Name shown on screen
Step Filter (%)
Input name
InpFilterPercent
Default
50
Allowed range
0–1000%
Description
Ratio applied to the mean absolute change. 0 means no hold.

Bars to average the change

Name shown on screen
Filter Bars
Input name
InpFilterBars
Default
30
Allowed range
1–1000 bars
Description
Number of bars W averaged for the absolute change used in the threshold.

Show AMA

Name shown on screen
Show AMA
Input name
InpShowAMA
Default
true
Allowed range
true / false
Description
Display of the blue dotted line. It does not change the step calculation.
8

Usage specifications

Required history

AMA starts from bar n+3 counted from the oldest, and the steps from bar n+W+2. The defaults are the 13th and 42nd bars. In the changed example they are the 163rd and 262nd bars, so with 200 bars of history only AMA appears.

Latest bar and history

The latest line changes with the price. It is recalculated when the start or content of the history, or the settings, change.

With a 1-bar average

With Filter Bars=1 and Filter Percent of 100 or less, the steps have the same value as AMA.

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 trade orders. It does not guarantee profit or future price movement.

9

Troubleshooting and usage notes

Only the AMA is visible

The step needs changes for another Filter Bars bars. Check the history.

The steps do not stand out

The 2 lines may be overlapping. Compare with the default values or view at actual size.

It does not start after changing inputs

An input outside the allowed range is refused at startup. Check the English reason shown on the Experts tab of the Toolbox, not an explanation on the chart, and confirm by returning to the default 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

AMA formula

ER is obtained by dividing the absolute difference from n bars earlier by the sum of the absolute price differences over n bars plus 1e−9. c=ER×(2/(Fast+1)−2/(Slow+1))+2/(Slow+1), SC=c^Power, A=previous A+SC×(price−previous A).

Step formula

d[i]=A[i]−A[i−1], T[i]=Percent/100×average(|d|,W). If |d[i]|<T[i], the previous step; otherwise A[i]. The first step takes the A of that bar.

Relation to the standard

For AMA with Power=2, values have been cross-checked against the MT5 standard AMA on the close with 10/2/30, 160/3/100 and 1/2/30. The stepped line is an additional display unique to this product.