Filter Type first
When changing values such as Period, Alpha or Stages, check whether the input is used by the selected method.
Overlays on the price chart a line chosen from 7 calculation methods. The meaning of the inputs differs by method, and with settings such as a short Period, swings may be enlarged rather than weakened.
Filter Type firstWhen changing values such as Period, Alpha or Stages, check whether the input is used by the selected method.
Beware of a short PeriodSettings such as Period=2 or 3 in methods 2 and 3 enlarge short-cycle movements. Do not assume the smoothing effect from the name alone.
Shift is the drawing positionWithout changing the values, it shifts the line to the right by the specified number of bars. The points on the right side are also values calculated up to the forming bar.
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.
When changing values such as Period, Alpha or Stages, check whether the input is used by the selected method.
Settings such as Period=2 or 3 in methods 2 and 3 enlarge short-cycle movements. Do not assume the smoothing effect from the name alone.
Without changing the values, it shifts the line to the right by the specified number of bars. The points on the right side are also values calculated up to the forming bar.
Distinguishing each method's calculation from the roles of the inputs is the starting point for reading it.
Repeats a 1-stage smoothing with the same coefficients Stages times. Gaussian Order is the coefficient design, and Stages is the actual number of stages.
Methods 1 and 2 use 2-stage feedback, and method 3 uses 3-stage feedback. Method 1 applies weights of 1, 2 and 1 to 3 prices. Method 4 uses fixed coefficients and does not use Period.
A 2-stage feedback whose coefficients are determined by Alpha. It takes the form of subtracting the high-frequency component from the price; with a small Alpha, it stays near the oldest price for a long time.
Adds half of the smoothed slope and the smoothed high-frequency component to a simple average of Period bars. Because the high-frequency component feeds back on the previous value, it is not a calculation over a finite window only.
| Filter Type as shown | Inputs that take effect | Meaning of Period |
|---|---|---|
| 0 Gaussian | Period, Gaussian Order, Stages | Cycle used to design the coefficients |
| 1 Two-Pole Binomial | Period | Cycle used to design the coefficients |
| 2 Two-Pole | Period | Cycle used to design the coefficients |
| 3 Three-Pole (default) | Period | Cycle used to design the coefficients |
| 4 Fixed Elliptic | Price, Shift | Not used |
| 5 Instantaneous Trend | Alpha, Second Line | Not used |
| 6 Model Trend | Period | Simple average window (4 or more) |
Price and Shift are used in all methods. Inputs that have no effect are also range-checked. The English in the table is the name that corresponds to the selection field.
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_Low_Pass_Filter_Line.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 8 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.
InpFilterTypeInpPeriodInpOrderInpStagesInpAlphaInpAppliedPriceInpShiftInpSecondLineMethods 0 to 5 draw from the oldest bar. They start by treating everything before it as the oldest price, so the first value is the price, apart from rounding. Method 6 starts from bar Period+1, and line 2 from bar 3.
Method 0 is an average within the range of the prices used. Methods 1 to 6 and line 2 include negative weights and can go above the highest or below the lowest of the prices used. The frequency and size are not uniform.
The main line is an orange solid line with width 2. Line 2 is a blue dotted line with width 1. Line 2 is also calculated from values up to now and carries no separate meaning. There are no level lines, marks, text or notifications.
Even the rightmost point shifted to the right moves with the value of the forming bar. However, if the input price is Open, it does not move unless that bar's open changes. Using Second Line and Shift together does not change the formula.
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.
The ranges of all inputs are checked regardless of the method. For example, even with method 3, it does not start if Alpha=0.
Check that Filter Type=5 is combined with Second Line=true, and that there are 3 or more bars. It is not drawn in other methods.
Method 6 needs Period+1 bars or more. With Period=2000, 2,001 bars are needed. With a small Alpha, the line can also be outside the display range.
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.
In method 0, Period is the cycle at which the swing amplitude becomes about 0.71 times only when Stages and Gaussian Order are the same. With more stages that cycle is longer, and with fewer it is shorter. In methods 1 to 3, a short Period does not become the boundary as designed. In methods 2 and 3, Period=2 and 3 enlarge short-cycle swings, and in method 3 with Period=2, the swing at a 2-bar cycle becomes about 2 times. Because methods 2 to 6 have bands where swings are enlarged beyond 1 times, they cannot be read unconditionally as "removing short cycles".
The slope is half of the price change from Period−1 bars earlier. That slope is smoothed with 1, 2, 2, 1, and half of the result is then added to the line. In other words, 1/4 of the smoothed price change goes into the line. Period is the window of the simple average, not a boundary that uniformly removes short cycles.
A preliminary count with the oldest 50 to 500 bars changed on real 1-minute data. The last bar at which the difference from the new start exceeded 1×10⁻⁹ was bar 36 to 52 with the defaults (maximum difference 1.26×10⁻⁴), bar 5,059 to 6,190 with Model Trend and Period=2000 (6.25×10⁻⁴), and bar 6,609 to 8,700 with Three-Pole and Period=2000 (8.57×10⁻⁴). With Alpha=0.000001, the difference remained until the end in all 19 cases, with a maximum of 9.20×10⁻⁴. There is no guarantee of the same length or difference with other data.
The name includes the method, the Period used and the price; for method 0 also the order and the number of stages, for method 5 Alpha, and the shift if it is not 0. Alpha is shown to 3 significant digits, and 0.9995 or more may appear as 1. Second Line and unused inputs cannot be identified from the name. Check them on the Inputs tab.
The calculation per bar is proportional to Period in method 6 and to Stages in method 0. In the other methods, the number of operations does not increase with Period. All methods hold 30 buffers, and memory increases with the number of bars and the number of instances placed at the same time. Actual time and actual memory use are not guaranteed.
Because the coefficients are designed from Period, the values are not necessarily the same as those of a general exponential-type average given the same period number. Even with order 1 and 1 stage in method 0, you need to check how the coefficients are determined.
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.