Use blue as the reference
Read how much the AMA changed from 1 bar earlier.
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.
Blue dotted lineThe AMA before filtering. It can be hidden with Show AMA.
Orange stepsSmall changes are held back, and on a bar that meets the condition the line moves to the current AMA.
When they overlapWhile the hold condition is not met, orange and blue overlap.
Compares the default settings and a settings change example on a screen with only this product applied.
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.
Read how much the AMA changed from 1 bar earlier.
If the change is below the threshold, orange stays at its previous value.
The overlap in the change example is not a disappearance. It can be checked at actual size.
By not reflecting small AMA changes in the stepped line, it shows continuous lines and holding stretches separately.
Changes the tracking coefficient based on the ratio of the net price change to the sum of the changes along the way.
Multiplies the average absolute AMA change over the last W bars by Filter Percent/100. The current change is included.
If the absolute value of the current AMA change is below the threshold, the previous step is kept. Otherwise, the current AMA is used.
With Filter Percent=0, the hold condition is never met, and the step follows the AMA.
Tell apart the blue dotted line and the orange line.
Look at the hold relative to the AMA changes before and after.
Do not mix it with changes to the AMA period; separate the effects of Percent and Bars.
| Included file | Purpose / location |
|---|---|
| TRI_Adaptive_MA_Step.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.
Extract the ex5 main file rather than leaving it in the compressed file.
In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.
Refresh the Navigator or restart MT5, and apply it to the target chart. Place only 1 instance of the same product on 1 chart.
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.
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.
InpPeriodInpFastPeriodInpSlowPeriodInpPowerInpPriceInpFilterPercentInpFilterBarsInpShowAMAAMA 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.
The latest line changes with the price. It is recalculated when the start or content of the history, or the settings, change.
With Filter Bars=1 and Filter Percent of 100 or less, the steps have the same value as AMA.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
This product shows calculation results through plot buffers and does not place trade orders. It does not guarantee profit or future price movement.
The step needs changes for another Filter Bars bars. Check the history.
The 2 lines may be overlapping. Compare with the default values or view at actual size.
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.
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).
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.
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.