Length
An integer from 1 to 500. It is not a window that simply averages the most recent Length bars; it determines the coefficient.
Using the distance between the selected price and internal bands, it calculates 1 line while varying the smoothing coefficient and overlays it on the price chart. Length and Phase are inputs that change the shape of the calculation.
LengthAn integer from 1 to 500. It is not a window that simply averages the most recent Length bars; it determines the coefficient.
Phase−100 to 100. Changes the shape of the line. It is not an input that shifts the drawing to the right or left.
Start of the historyDrawing starts from bar 31. The initial prices and the number of bars loaded also affect later values.
Compares the default settings and a settings change example on a screen with only this product applied.
Example shown: M1. This is an example to explain the display. The example of changed settings is not a recommended value. Details can be checked in the full-size view. Also check the price scale of the main chart and the position of the candlesticks.
An integer from 1 to 500. It is not a window that simply averages the most recent Length bars; it determines the coefficient.
−100 to 100. Changes the shape of the line. It is not an input that shifts the drawing to the right or left.
Drawing starts from bar 31. The initial prices and the number of bars loaded also affect later values.
Not a fixed-period average but an adaptive smoothing that carries over its past internal state.
The distance between the price and the farther of the upper and lower internal bands is divided by the typical size of recent distances. If the ratio is 1 or less, the base coefficient is kept as it is; above 1, the bar's price is taken in more strongly, up to a limit determined by Length. A band moves to the price when the price goes outside it, and moves toward the price when the price is inside it.
The larger Length is, the closer the base coefficient gets to 1 and the more weight the previous value has. It also increases the maximum factor, relative to the base, by which the price intake can be strengthened on bars with a large ratio. Phase is the multiplier for adding the residual: −100 gives 0.5 times, 0 gives 1.5 times and 100 gives 2.5 times.
Because it includes a correction and a smoothing that carries over the previous bar's change, the line can go above the highest or below the lowest of the prices used. It is not necessarily an average that stays within the range of the candlesticks.
The distance ratio has no effect on the coefficient, and the line is almost the same as the input price. However, it is not necessarily always the same value as the price itself.
First, load the needed history with the defaults, and check the price bars and the orange line.
Cross-check the settings section of this manual against the Inputs tab of the properties. All inputs changed in the changed example are shown in the comparison box.
Align the timeframe and the display range, and compare the shape of the line. Read differences in shape as differences in inputs and calculation.
| Included file | Purpose / location |
|---|---|
| TRI_Volatility_Adaptive_Smoother.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'.
Using this product does not require allowing DLLs. When removed, this product's drawings are cleared.
There are 3 inputs. Change them on the Inputs tab of the properties. The English item names defined in the source are shown together with the input names.
InpLengthInpPhaseInpPriceThe default is an orange (DarkOrange) solid line with width 2. There are no level lines, marks, text or notifications. No value header like that of a separate window appears on the price chart.
The first 30 bars are not drawn. Bar 31 is that bar's input price. If the input prices of the first 30 bars are all the same, bars 31 to 60 also draw each bar's input price, and smoothing starts from bar 61.
It builds its state from the oldest price. If older bars are added or the loading start changes, the line value at the same time can also change.
When Applied Price is not Open, the value of the forming bar changes. With Open, it does not change during the bar unless that bar's open changes.
The vertical range of the price chart is based on the candlesticks. It does not automatically expand to fit the indicator line, so the line is not visible if it goes outside the upper or lower display range.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
Check that there are 31 or more bars. Immediately after the history is increased, the older parts of the line are also recalculated.
Do not read Phase as a display shift or a time angle; check it, together with Length, as an input to the coefficient.
With settings outside the allowed range, it does not start, and 1 line with the reason in English appears on the Experts tab. Return the input to within the range and apply it.
The numbers in the display name are rounded or omitted. Check the actual values on the Inputs tab of the indicator's properties. The name alone does not confirm all inputs.
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.
The short average of the distance uses 10 bars, and the reference is the average of the middle 65 of the past 127 of those averages, sorted. On the earliest bars, it prepares using the range that is available. A coefficient is made from the distance ratio and Length, and the price smoothing, the residual smoothing, the correction by Phase and the final smoothing are calculated in that order. The bands themselves are not drawn on the screen.
In a preliminary count on real 1-minute data, changing the oldest 50 to 500 bars produced, with the defaults, differences about the size of a typical 1-bar range, and they affected the values up to about 360 to 520 bars from the start. With Length=500 there was a case where the effect extended to about 1,700 bars, and with Length=1 there was no difference. This size and length change with the settings and the price data, and are not values guaranteed for other symbols or timeframes.
The name includes Length, Phase and the input price. The line label is Smoother with Length and Phase. It is not a product that shows a value header on the price chart.
On each bar, it sorts up to 127 values. Increasing Length does not increase this number. Actual processing time and the load with long histories are not guaranteed.
Close is the close, Open is the open, High is the high and Low is the low. Median=(high+low)/2, Typical=(high+low+close)/3, Weighted=(high+low+2×close)/4.
The display is a record of the calculation. It is not a function that instructs actions based on the line's position or slope. MT5 only.