Orange line
Values from the selected averaging method.
You choose from the 4 standard methods and Sine WMA, Triangular, LSMA, Hull and Zero-Lag EMA; the indicator draws 1 average line on the price chart.
Choose from 9 methodsEven with the same period, a different method changes the values and where the line starts.
Check the priceBesides the close, you can choose the open, high, low and others.
Distinguish the shiftMoving to the right changes the display position. It is not a line that calculated future prices.
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.
Values from the selected averaging method.
Even with the same period, the values, weights and number of bars needed at the start differ.
0 keeps the original bar position; a positive number shifts it right by the specified number of bars.
Lets you choose among several averaging methods with unified inputs and 1 display line.
SMA is equally weighted, EMA is exponential smoothing, SMMA is a smoothed average, and LWMA is linear weighting with newer bars weighted more. Choose SMMA for Wilder-type smoothing.
Sine WMA is sine weighting with newer bars weighted more. Triangular applies SMA 2 times. If the period n is even, the total number of bars used in the calculation is n+1.
LSMA is the latest position of a straight line fitted to the last n bars. Hull smooths the difference of 2 LWMAs with a further LWMA. It may go outside the original price range.
Applies EMA to a series that adds the difference from the price a lag number of bars earlier. The name describes the calculation method and does not guarantee zero lag.
It starts with EMA 5, close and a shift of 0.
Record which of the method, period, price or shift you changed.
There is no text label for the latest value. Check the line values in the Data Window.
| Included file | Purpose / location |
|---|---|
| TRI_Multi_Method_MA.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 4 inputs. Change them on the Inputs tab of the properties window. The English display names are shown together with the input names in the code.
InpPeriodInpMethodInpPriceInpShiftEMA appears from the oldest bar, and the regular methods after a period's worth of history. Hull and Triangular need more history. Details are given in the technical information.
The 5 additional methods are formulas defined in this product. Other implementations with the same name do not necessarily use the same rounding, period splitting or initial values.
The current value also changes as the target price updates. A line shifted to the right also changes its value if its source bar is forming.
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.
Check that there is enough history for the period and that a line shifted right is not off screen.
A Hull period of 1 and an out-of-range shift are not accepted. Check the reason in English on the Experts tab.
Check the definition and applied price of each method, such as the even period of Triangular and the rounding down in Hull.
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.
Sine WMA: the weight of the bar k bars before the latest is sin(π/2−πk/(2n)). Triangular: SMA of m = ceil((n+1)/2) applied 2 times. LSMA: the latest position of the least-squares line over the last n bars. Hull: with h = floor(n/2) and r = floor(√n), LWMA_r(2LWMA_h−LWMA_n).
g = floor((n−1)/2), α = 2/(n+1). It starts with the price at the nth bar, and after that it is α × (2 × current price − price g bars earlier) + (1−α) × previous value.
Taking the oldest bar as bar 1, EMA starts from bar 1, Triangular from bar 2m−1, Hull from bar n+r−1, and the others from bar n. Shift only moves the drawing position of these calculated values to the right.
Median = (H+L)/2, typical = (H+L+C)/3, weighted close = (H+L+2C)/4. There are no alerts or text labels for the latest value.