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

Choose the input from 9 price types; 1 line calculated with one of 15 methods is overlaid on the price chart. The shape of the line changes with the choice of method, period and price.

Indicator name: Multi-Method MA PlusMetaTrader 5Main chart, price units, 1 line

Choose the price → choose the calculation method → read the 1 line

① Price9 types such as Close→② Method and period15 methods such as EMA→③ 1 linePrice unitsThe shift changes only the display position
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Check the priceBesides the close, you can also choose average prices or a price that depends on the bar's direction.

2

Check the methodEven with the same period, the weights, the start-up and the number of bars needed differ by method.

3

Check the positionShift 0 is the position of the bar being calculated. A positive shift moves the line to the right.

Choose 1 of 15 methodsPeriod up to 2000No arrows or notifications
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
Period / MA Period
InpPeriod
5 → 10
Calculation method / MA Method
InpMethod
EMA → T3
Input price / Applied Price
InpAppliedPrice
Close → Weighted OHLC
T3 factor / T3 Factor (0 to 1)
InpT3Factor
0.7 → 0.5

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; InpAppliedPrice = Close; InpT3Factor = 0.7
Multi-Method MA Plus default settings
The default is EMA, period 5, Close, shift 0. The orange line is the calculation result.
View the screen in detail at full size
Multi-Method MA Plus default settings (full size)
Example of changed settingsInpPeriod = 10; InpMethod = T3; InpAppliedPrice = Weighted OHLC; InpT3Factor = 0.5
Multi-Method MA Plus example of changed settings
An example changed to T3, period 10, Weighted OHLC and T3 Factor 0.5. Because 4 items are changed at the same time, the difference cannot be read as the effect of only 1 item.
View the screen in detail at full size
Multi-Method MA Plus example of changed settings (full size)

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.

2

How to read it in 30 seconds

First find the line

The orange line overlaid on the main chart is this product. It is not an indicator in a separate window.

Next, check the settings

Check MA Method, MA Period and Applied Price. For T3 and EMA Order, also check the additional factor and number of stages.

Separate shape from position

The line's values are determined by the calculation method, and its horizontal position by MA Shift. Do not read the display as a guarantee of future prices.

3

What it measures

Processes the selected price series with 1 method. Not all methods are simple averages, and some methods go outside the range of the prices used.

A line in price units

The output is in price units, not a ratio or a point width. With prices other than Close, the difference between the line and the close also includes the difference in the input price.

The period number alone does not allow comparison

With Triangular's 2-stage averaging, T3's internal period, Hull's rounding to integers and so on, the bars used and the weights differ even for the same n.

When the line goes outside the range

LSMA, Hull and Zero-Lag EMA, and under some conditions T3, EMA Order, TSF and Quad LSMA, include negative weights and can exceed the price range.

Difference between the median and the average

Moving Median uses the rank order of prices. The line can move in steps after being flat, and it does not necessarily react less than SMA to large price changes.

The 15 methods and the bars needed before the first value appears

n is MA Period, ceil is rounding up and floor is rounding down. Below is the number of bars, counted from the oldest bar of the loaded history, at which the first value is defined. It is not the number of bars until the display stabilizes.

MethodCalculation summaryFirst value
SMAArithmetic average of the most recent n bars.n bars
EMAα = 2/(n+1). Starts from the oldest price and blends the previous value with the current price.1 bar
SMMAFirst an SMA of n bars. After that, a weight of (n−1)/n on the previous value and 1/n on the current price.n bars
LWMAWeights of n on the latest bar, n−1 on the next older, …, 1.n bars
Sine WMAOne-sided weights that are heavier on the latest side. The weight k bars before the latest is cos(πk/(2n)).n bars
TriangularWith m = ceil((n+1)/2), an SMA of m bars is averaged again over m bars. For even n, n+1 bars are used.2m−1 bars
LSMAThe value at the latest position of the least-squares straight line fitted to the most recent n bars.n bars
HullSmooths 2×LWMA(floor(n/2))−LWMA(n) with an LWMA of floor(√n) bars.n+floor(√n)−1 bars
Zero-Lag EMAg = floor((n−1)/2). Smooths 2 × the current price − the price g bars earlier with an EMA. The first value is the price of bar n.n bars
T3Combines stages 3 to 6 of a 6-stage EMA with coefficients. The period of each stage corresponds to (n+1)/2.1 bar
EMA OrderCalculates k stages of EMA with the same period and combines them with alternating binomial coefficients. k = 1 is EMA, and k = 2 is 2E1−E2.1 bar
TSFThe least-squares straight line fitted to the most recent n bars, extended by 1 bar toward the newer side. With shift 0, it is drawn at the position of the current bar.n bars
Quad LSMAThe value at the latest position of the least-squares 2nd-degree curve fitted to the most recent n bars. With n = 3, it is the selected price itself.n bars
Bell WMAThe weight k bars before the latest is exp(−9k²/(n+1)²). Averages with positive weights that become sharply lighter toward older bars.n bars
Moving MedianSorts the prices of the most recent n bars by size and takes the middle 1 value for odd n, or the average of the middle 2 values for even n.n bars

Hull and TSF require n≧2, and Quad LSMA requires n≧3. With period 2000, SMA needs 2000 bars, Triangular 2001 bars and Hull 2043 bars. The visible range also changes with the state of the price feed and the history.

The 9 selectable prices

O = open, H = high, L = low, C = close. Median here is the midpoint between the high and the low. It differs from the Moving Median method's "median taken by sorting multiple bars".

Applied PriceFormulas
CloseC
OpenO
HighH
LowL
Median(H+L)/2
Typical(H+L+C)/3
Weighted(H+L+2C)/4
Weighted OHLC(5C+2O+H+L)/9
DirectionalIf CO, (H+C)/2; if C=O, C
4

Situations for reading the display

The line moves away from the candlesticks

Indicator
This product's line
Cross-check
Cross-check the method, the input price and the shift.
Check
Check whether the method includes negative weights and whether a shift to the right is set.
Caution
Do not reinterpret the distant position as a price target.

The shape differs even with the same period

Indicator
Lines with different methods
Cross-check
Compare not only the period but also the conventions specific to each method.
Check
Check T3's internal period, Triangular's effective number of bars and the number of EMA Order stages.
Caution
Even if another indicator has the same name, it is not necessarily the same, down to how it starts.

Past parts of the line seem to have changed

Indicator
Methods that depend on history
Cross-check
Check the start of the loaded history and the settings.
Check
EMA, SMMA, Zero-Lag EMA, T3 and EMA Order carry over the influence of the starting value.
Caution
Do not confuse changes on the latest bar with recalculation due to added history.
5

Steps for checking the display

1

Apply with the defaults

Check the line on the main chart with EMA, period 5, Close and shift 0.

2

Decide which items to compare

When you compare effects yourself, change 1 item at a time. The changed image in this manual is a separate settings example with 4 items changed.

3

Look at the method-specific conditions

Before setting, check the history needed, the minimum number of bars, and the meaning of the factor and the number of stages.

4

Check the horizontal position

If you change the shift, check that only the position of the line moves to the right. The calculation period of the values does not move forward.

6

Installation and checking the package contents

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

Using this product does not require allowing DLLs. When removed, this product's drawings are cleared.

7

Settings

There are 6 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.

Period

English item name
MA Period
Input name
InpPeriod
Default
5
Allowed range
Integer 1 to 2000. However, Hull and TSF: 2 to 2000; Quad LSMA: 3 to 2000.
Description
The period n used in the calculation. See Chapter 3 for each method's initialization and effective number of bars.

Calculation method

English item name
MA Method
Input name
InpMethod
Default
EMA
Allowed range
15 methods, from SMA to Moving Median.
Description
You can choose 1 method. Chapter 3 summarizes each method's calculation and the number of bars needed.

Input price

English item name
Applied Price
Input name
InpAppliedPrice
Default
Close
Allowed range
Close, Open, High, Low, Median, Typical, Weighted, Weighted OHLC, Directional.
Description
Choose the price from each bar that is passed to the calculation. See Chapter 3 for the formulas.

Shift to the right

English item name
MA Shift (bars, to the right)
Input name
InpShift
Default
0
Allowed range
Integer 0 to 100 bars.
Description
0 is the same position as the bar being calculated. A positive value shifts the line to the right. It does not change the calculated values themselves.

T3 factor

English item name
T3 Factor (0 to 1)
Input name
InpT3Factor
Default
0.7
Allowed range
Finite number 0 to 1.
Description
Used in the calculation only when T3 is selected. At 0 it becomes the 3rd-stage EMA. Out-of-range input is not accepted even with methods other than T3.

Number of EMA stages to combine

English item name
EMA Order (1 to 10)
Input name
InpEmaOrder
Default
2
Allowed range
Integer 1 to 10.
Description
The number of stages k, used only when EMA Order is selected. 1 is the same calculation as EMA. 2 or more combines the stages with alternating coefficients according to their number. Out-of-range values are not accepted with other methods either.
8

Usage specifications

The forming bar changes

On the latest bar, the line value also changes with price updates. With prices other than Open, take particular care to distinguish changes while the bar is forming.

Effect of the start of the history

EMA, SMMA, Zero-Lag EMA, T3 and EMA Order carry over the starting value, so if the oldest bar changes, later values can also change. The influence generally fades, but the difference does not necessarily shrink from 1 bar to the next. There are also exceptions, such as period 1, where the value is the price itself.

Display start and stability are separate

Even if EMA, T3 and EMA Order have values from the first bar, they are not necessarily the same as the values with a sufficiently long history. Setting a large period on a short history leaves the influence of the starting value.

What it draws

Only 1 line in price units. There are no arrows, level lines, color fills, text displays or notification functions.

Load and period

Some methods require more processing the longer the period or history. Moving Median sorts each window. Low calculation time and memory use are not guaranteed.

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

The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.

9

Troubleshooting and usage notes

No lines appear

Check that there is enough history for the method, and that the period, shift, factor and number of stages are within range. If it refuses to start because of an out-of-range value, the reason is shown in English on the Experts tab.

It does not start even though the factor is not used

The ranges of T3 Factor and EMA Order are checked even when another method is selected. Set them back to 0 to 1 and 1 to 10 respectively.

The settings cannot be fully read from the name

Check the exact values on the Inputs tab of the properties. In the short name, T3 Factor is rounded to 3 significant digits, and a shift of 0 is omitted.

The line goes off screen

With long periods or with methods that include negative weights, the line can move away from the displayed price range. Check the vertical scale of the chart.

Values differ from another product

Compare not only the name and period but also the price, the initial value, rounding, the method definition and the start of the history. Not all methods necessarily give the same values as the MT5 standard.

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

T3 calculation and period

For n, the α of each stage's EMA is 2/((n+1)/2+1). The 6 stages start from the oldest price. With b as T3 Factor, the result is −b³E6+(3b²+3b³)E5+(−6b²−3b−3b³)E4+(1+3b+3b²+b³)E3. b = 0 gives E3. To match a definition in which each stage's period is P, this product's n corresponds to 2P−1. With b>0 and n≧2, it includes negative weights.

EMA Order calculation

Calculates k stages of EMA with the same α = 2/(n+1), all starting from the oldest price. The coefficient of stage j is (−1) to the power of (j+1) × the number of combinations C(k,j). k = 3 is 3E1−3E2+E3. With k≧2 and n≧2, it includes negative weights. The number of stages is a calculation setting.

Distinguish TSF from the shift

Adds the slope per 1 bar of the straight line fitted to the most recent n bars to that line's value at the latest position. With shift 0, it is drawn on the bar being calculated. With shift 1 or more, it moves to the right; with shift 1, the position of the extended line and the drawing position coincide. This is a calculated value obtained from past and current prices, not an actual future price.

Price range and exceptions

SMA, EMA, SMMA, LWMA, Sine WMA, Triangular, Bell WMA and Moving Median are calculations within the range of the prices used. For recursive methods, this range is not necessarily only the most recent n bars. LSMA with n = 1 to 2 and Zero-Lag EMA with n = 1 to 4 do not include negative weights. Quad LSMA is the price itself at n = 3 and includes negative weights at n≧4. Tiny differences due to floating-point rounding can occur.

Finite windows and added history

Once the required window is available, SMA, LWMA, Sine WMA, Triangular, LSMA, Hull, TSF, Quad LSMA, Bell WMA and Moving Median do not use prices from before that window. Recursive methods carry over the calculation from the oldest bar. In both cases, values can change if the original prices are corrected.

Implementation scope

A drawing indicator for MT5; no external library, DLL, registration or account authentication is required. Of the 14 buffers, 1 is displayed. There is no trade processing. Apart from color and width, it does not provide any additional trading functions.