MT5 indicators← Multi-Method MA 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

Multi-Method MA

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.

Indicator name: Multi-Method MAMetaTrader 5Price chart

Choose the method, price and period, and read 1 line

Choose from 7 applied prices9 averaging methods + periodShifting right changes only where the calculated values are displayedA line extending into the future is not a forecast either
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Choose from 9 methodsEven with the same period, a different method changes the values and where the line starts.

2

Check the priceBesides the close, you can choose the open, high, low and others.

3

Distinguish the shiftMoving to the right changes the display position. It is not a line that calculated future prices.

Default: EMA 5, closeRight shift 0–100Does not guarantee lightness or low lag
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
Averaging period
InpPeriod
5 → 20
Averaging method
InpMethod
EMA → Hull

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 = 5 / InpMethod = EMA
Multi-Method MA default settings
The default is EMA5, close, shift 0. 1 orange line is overlaid on the price chart.
View the screen in detail at full size
Multi-Method MA default settings (actual size)
Settings change exampleInpPeriod = 20 / InpMethod = Hull
Multi-Method MA settings change example
Changed to Hull 20. The close and a shift of 0 are the same. 2 items differ: the method and the period.
View the screen in detail at full size
Multi-Method MA 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

Orange line

Values from the selected averaging method.

Differences between methods

Even with the same period, the values, weights and number of bars needed at the start differ.

Display shift

0 keeps the original bar position; a positive number shifts it right by the specified number of bars.

3

What it measures

Lets you choose among several averaging methods with unified inputs and 1 display line.

The 4 standard methods

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, Triangular

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, Hull

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.

Zero-Lag EMA

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.

4

Situations for reading the display

Switching the method

Indicator
The shape of the line changes
Cross-check
Method, period, applied price
Check
Compare the values on the same bar
Caution
It does not necessarily match other products with the same method name.

There is a line to the right of the latest bar

Indicator
Positive Shift
Cross-check
Values calculated on the original bars
Check
Separate the display position from the calculation time
Caution
It is not a forecast of future values.
5

Steps for checking the display

1

Check the default line

It starts with EMA 5, close and a shift of 0.

2

Change 1 item at a time

Record which of the method, period, price or shift you changed.

3

Read it in the Data Window

There is no text label for the latest value. Check the line values in the Data Window.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Multi_Method_MA.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 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.

Average period

Name shown on screen
MA Period
Input name
InpPeriod
Default
5
Allowed range
1–500; 2–500 for Hull
Description
The actual number of history bars needed differs by method.

Averaging method

Name shown on screen
MA Method
Input name
InpMethod
Default
EMA
Allowed range
SMA / EMA / SMMA / LWMA / Sine WMA / Triangular / LSMA / Hull / Zero-Lag EMA
Description
Choose 1 of the 9 methods.

Applied price

Name shown on screen
Applied Price
Input name
InpPrice
Default
Close
Allowed range
Close, open, high, low, median, typical, weighted close
Description
The price used to calculate the average.

Bars to shift right

Name shown on screen
MA Shift (bars, to the right)
Input name
InpShift
Default
0
Allowed range
0〜100
Description
Displays the line to the right without changing the calculated values. It cannot be shifted left.
8

Usage specifications

Initial display

EMA 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.

Definition of the methods

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.

Forming bar

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.

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

The line is not visible

Check that there is enough history for the period and that a line shifted right is not off screen.

It does not start

A Hull period of 1 and an out-of-range shift are not accepted. Check the reason in English on the Experts tab.

Different even with the same period

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.

10

Technical information and specification details

Formulas of the added methods

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).

Zero-Lag EMA

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.

First valid 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.

Shared price

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.