MT5 indicators← MA Direction Strip 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

MA Direction Strip

Compares the directions of 4 moving averages with 4 rows of marks for each bar. Only on bars where all 4 rows are rising, or all are falling, is a mark also placed in the top row.

Indicator name: MA Direction StripMetaTrader 5Separate window

Read the directions of the 4 rows and the agreement in the top row separately

Rows 1, 2, 3, 4: separate moving averagesGreen = up / red = down / gray = unchangedAll 4 rows in the same direction → mark in the top rowTell a blank from a 0 in the heading by also looking at the 4 rows below
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Rows 1–4 from the topThe top row is for agreement only. The 4 rows below it are the individual moving averages.

2

The 3 colors show the change of the moving averageGreen is up, red is down and gray is unchanged. They do not show the position relative to the price.

3

Distinguish a blank from 0A blank in the top row occurs both with disagreement and with insufficient history. Also check the marks in the 4 rows below.

MT5 only4 rows + agreement rowDefault uses forming values
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
Handling of higher-timeframe values
InpBarMode
Forming Bar (As Of Each Chart Bar) → Last Closed Bar
Row 1 timeframe
InpTf1
Current (chart timeframe) → M15
Row 1 period
InpPeriod1
89 → 10
Row 1 method
InpMethod1
LWMA → SMA
Row 1 price
InpPrice1
Weighted → Close
Row 2 timeframe
InpTf2
H4 → H1
Row 2 period
InpPeriod2
55 → 21
Row 2 method
InpMethod2
LWMA → EMA
Row 2 price
InpPrice2
Weighted → Close
Row 3 period
InpPeriod3
34 → 5
Row 3 method
InpMethod3
LWMA → SMMA
Row 3 price
InpPrice3
Weighted → Median
Row 4 timeframe
InpTf4
W1 → MN1
Row 4 period
InpPeriod4
21 → 3
Row 4 method
InpMethod4
LWMA → SMA
Row 4 price
InpPrice4
Weighted → Typical

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 settingsInpBarMode = Forming Bar (As Of Each Chart Bar) / InpTf1 = Current (chart timeframe) / InpPeriod1 = 89 / InpMethod1 = LWMA / InpPrice1 = Weighted / InpTf2 = H4 / InpPeriod2 = 55 / InpMethod2 = LWMA / InpPrice2 = Weighted / InpPeriod3 = 34 / InpMethod3 = LWMA / InpPrice3 = Weighted / InpTf4 = W1 / InpPeriod4 = 21 / InpMethod4 = LWMA / InpPrice4 = Weighted
MA Direction Strip default settings
Default: LWMA of H1 89, H4 55, D1 34 and W1 21, weighted close. Read the blank top row and the colors of the 4 rows below it separately.
View the screen in detail at full size
MA Direction Strip default settings (full size)
Example of changed settingsInpBarMode = Last Closed Bar / InpTf1 = M15 / InpPeriod1 = 10 / InpMethod1 = SMA / InpPrice1 = Close / InpTf2 = H1 / InpPeriod2 = 21 / InpMethod2 = EMA / InpPrice2 = Close / InpPeriod3 = 5 / InpMethod3 = SMMA / InpPrice3 = Median / InpTf4 = MN1 / InpPeriod4 = 3 / InpMethod4 = SMA / InpPrice4 = Typical
MA Direction Strip example of changed settings
Changed example: in addition to the closed-bar mode, the timeframe, period, method and price of the 4 rows are changed. The specified M15 is replaced with H1 on this H1 chart. All changed inputs are as in the table above.
View the screen in detail at full size
MA Direction Strip example of changed settings (full size)

Example shown: 1-hour timeframe (H1). This is an example to explain the display. The changed settings are not recommended values. Details can be checked in the full-size view. Also check the vertical axis and units of the separate window. Except for products with a fixed scale, the scale changes with the settings and the display range.

2

How to read it in 30 seconds

Row layout

The top row is agreement, followed by rows 1, 2, 3 and 4. The numeric scale on the right is not the price of the moving averages.

Meaning of the direction

The color shows whether the current moving average is larger than, smaller than or equal to its value 1 bar before. It is not the direction of future prices.

Check the history first

The default is intended for charts of H1 or higher. On M1 and M5, the weekly row and the agreement row may not appear because of insufficient history.

3

What it measures

The timeframe, period, method and price of each row can be selected separately. When marks continue they look like a band, but the unit of calculation is each chart bar.

The 4 individual rows

Green is up, red is down and gray is unchanged. No mark is shown in a row that cannot be calculated yet.

Agreement row

If all 4 rows have values and all are up, it is green; if all are down, it is red. With a mix, equal values or insufficient history, no mark is shown in the top row.

Forming Bar

The direction is decided from the interim higher-timeframe bar known as of each bar and the higher-timeframe bar 1 before it. Even within the same higher-timeframe bar, the color can change from one chart bar to the next.

Last Closed Bar

Compares closed higher-timeframe bars with each other. A row with the same timeframe as the chart also shows the direction up to 1 bar before.

Open the guide to the required history

This is a calculated guide. It assumes a calendar from January 1, 2024 with bars at each timeframe's interval for 24 hours from Monday to Friday (no Saturday or Sunday bars; weekday market holidays are not considered). The number of bars changes with the broker's actual bars, holidays, the start position of the history and the number of days in a month. It is not a guarantee that the display always starts from this number of bars on the terminal.

Ordinal of the chart bar where the calculation starts with the default settings

ChartRow 1 (chart timeframe 89)Row 2 (H4 55)Row 3 (D1 34)Row 4 (W1 21)Agreement row (first bar where the agreement state appears)
M19013,44150,401158,401158,401
M5902,68910,08131,68131,681
M15908973,36110,56110,561
M30904491,6815,2815,281
H1902258412,6412,641
H49056 (H4 = chart)211661661
D19056 (replaced with D1)35111111
W19056 (replaced with W1)35 (replaced with W1)2290
MN19056 (replaced with MN1)35 (replaced with MN1)22 (replaced with MN1)90

Even when the agreement state can be calculated, the 4 rows do not necessarily point in the same direction. With Last Closed Bar, the start is later by 1 bar of each row's timeframe. In the H1 example, from row 1: the 91st, 229th, 865th and 2761st bars. With Forming Bar, the same timeframe starts from bar period+1, and longer timeframes start from the period+2nd interval, counting the first unused interval.

4

Situations for reading the display

The last number in the heading is 0

Indicator
The 5th number and rows 1–4
Cross-check
If all 4 rows have a latest mark, the final 0 means not in agreement. If any of them has no mark, the calculation is insufficient.
Check
Do not judge from the blank in the top row alone; look at the 4 rows below.
Caution
If Show Agreement Row is turned off, the top row is never visible.

The color changes partway through

Indicator
The latest forming mark
Cross-check
With Forming Bar, the calculation uses the interim higher-timeframe bar.
Check
If needed, compare it with Last Closed Bar on a separate chart.
Caution
The closed-bar mode lags by 1 higher-timeframe bar.

The specified timeframe differs from the name

Indicator
The timeframe shown in the window name
Cross-check
Shorter timeframes and some others are replaced with the current chart's timeframe.
Check
Check that M15 on H1 becomes H1.
Caution
Different inputs can result in the same timeframe.
5

Steps for checking the display

1

Start checking from the H1 default

Read the timeframes and periods of the 4 rows from the window name.

2

Read the 4 rows below

Excluding the top row, check the colors and blanks of rows 1–4 from the top.

3

Check the agreement

On bars where all 4 rows have marks, check whether there is a mark in the top row.

4

Keep the correspondence when changing

Change the settings row by row, and also check the actual timeframe shown in the window name.

6

Installation and checking the package contents

Included filePurpose / location
TRI_MA_Direction_Strip.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 18 inputs. Change them on the Inputs tab of the properties window. The English name shown on screen and the input name in the code are listed together.

Handling of higher-timeframe values

Name shown on screen
Higher Timeframe Value
Input name
InpBarMode
Default
Forming Bar (As Of Each Chart Bar)
Allowed range
Forming Bar (As Of Each Chart Bar) / Last Closed Bar
Description
Forming Bar uses the interim higher-timeframe bar known as of each chart bar; Last Closed Bar uses the closed higher-timeframe bars up to 1 bar before.

Row 1 timeframe

Name shown on screen
Row 1 Timeframe
Input name
InpTf1
Default
Current (chart timeframe)
Allowed range
Current or a standard timeframe from M1 to MN1
Description
Current is the same timeframe as the chart. Shorter timeframes, and timeframes whose length does not divide evenly, are replaced with the chart's timeframe.

Row 1 period

Name shown on screen
Row 1 Period
Input name
InpPeriod1
Default
89
Allowed range
1〜500
Description
The moving average period, counted in the row's timeframe.

Row 1 method

Name shown on screen
Row 1 Method
Input name
InpMethod1
Default
LWMA
Allowed range
SMA / EMA / SMMA / LWMA
Description
Simple, exponential, smoothed and linear weighted moving averages.

Row 1 price

Name shown on screen
Row 1 Price
Input name
InpPrice1
Default
Weighted
Allowed range
Close / Open / High / Low / Median / Typical / Weighted
Description
Selects from close, open, high, low, the middle of high and low, the average of high, low and close, and the weighted average with the close counted 2 times.

Row 2 timeframe

Name shown on screen
Row 2 Timeframe
Input name
InpTf2
Default
H4
Allowed range
Current or a standard timeframe from M1 to MN1
Description
Current is the same timeframe as the chart. Shorter timeframes, and timeframes whose length does not divide evenly, are replaced with the chart's timeframe.

Row 2 period

Name shown on screen
Row 2 Period
Input name
InpPeriod2
Default
55
Allowed range
1〜500
Description
The moving average period, counted in the row's timeframe.

Row 2 method

Name shown on screen
Row 2 Method
Input name
InpMethod2
Default
LWMA
Allowed range
SMA / EMA / SMMA / LWMA
Description
Simple, exponential, smoothed and linear weighted moving averages.

Row 2 price

Name shown on screen
Row 2 Price
Input name
InpPrice2
Default
Weighted
Allowed range
Close / Open / High / Low / Median / Typical / Weighted
Description
Selects from close, open, high, low, the middle of high and low, the average of high, low and close, and the weighted average with the close counted 2 times.

Row 3 timeframe

Name shown on screen
Row 3 Timeframe
Input name
InpTf3
Default
D1
Allowed range
Current or a standard timeframe from M1 to MN1
Description
Current is the same timeframe as the chart. Shorter timeframes, and timeframes whose length does not divide evenly, are replaced with the chart's timeframe.

Row 3 period

Name shown on screen
Row 3 Period
Input name
InpPeriod3
Default
34
Allowed range
1〜500
Description
The moving average period, counted in the row's timeframe.

Row 3 method

Name shown on screen
Row 3 Method
Input name
InpMethod3
Default
LWMA
Allowed range
SMA / EMA / SMMA / LWMA
Description
Simple, exponential, smoothed and linear weighted moving averages.

Row 3 price

Name shown on screen
Row 3 Price
Input name
InpPrice3
Default
Weighted
Allowed range
Close / Open / High / Low / Median / Typical / Weighted
Description
Selects from close, open, high, low, the middle of high and low, the average of high, low and close, and the weighted average with the close counted 2 times.

Row 4 timeframe

Name shown on screen
Row 4 Timeframe
Input name
InpTf4
Default
W1
Allowed range
Current or a standard timeframe from M1 to MN1
Description
Current is the same timeframe as the chart. Shorter timeframes, and timeframes whose length does not divide evenly, are replaced with the chart's timeframe.

Row 4 period

Name shown on screen
Row 4 Period
Input name
InpPeriod4
Default
21
Allowed range
1〜500
Description
The moving average period, counted in the row's timeframe.

Row 4 method

Name shown on screen
Row 4 Method
Input name
InpMethod4
Default
LWMA
Allowed range
SMA / EMA / SMMA / LWMA
Description
Simple, exponential, smoothed and linear weighted moving averages.

Row 4 price

Name shown on screen
Row 4 Price
Input name
InpPrice4
Default
Weighted
Allowed range
Close / Open / High / Low / Median / Typical / Weighted
Description
Selects from close, open, high, low, the middle of high and low, the average of high, low and close, and the weighted average with the close counted 2 times.

Show agreement row

Name shown on screen
Show Agreement Row
Input name
InpShowAgreement
Default
true
Allowed range
true / false
Description
false hides only the marks in the top row. The calculation of the 4 rows' directions and of the agreement state continues.
8

Usage specifications

When a selected timeframe is replaced

The same timeframe as the chart can be used. On charts of daily or lower timeframes, you can use daily or lower timeframes that are longer than the chart and whose length is divisible by the chart's length, as well as weekly and monthly timeframes. Others are replaced with the chart's timeframe. Example: M15 on H1 becomes H1, and H6 on H4 becomes H4. Weekly and monthly charts use only their own timeframe. Check the result after replacement in the window name and the “Experts” tab.

Higher timeframes are built from the current chart

It does not read the history of other timeframes directly; it groups the bars loaded in the current chart. There are no higher-timeframe bars older than the chart's history. For longer timeframes, the section containing the chart's first bar is not used. In calculations for the same timeframe, the first bar is also used.

Day, week and month boundaries

In server time, the boundary is 00:00 for daily bars, Sunday 00:00 for weekly bars and 00:00 on the 1st of the month for monthly bars. Sections without bars are not filled with new bars. If there are bars on Sunday, that day is also counted as 1 daily bar.

Results change with the history

The calculation is redone when the chart's history is added or corrected, or when the oldest bar or the settings change. For recursively calculated EMA, SMMA, RSI and ADX, past values and colors may also change. It is not guaranteed that past displays remain unchanged under all conditions.

Handling while forming and after closing

Forming Bar changes during the latest bar. Closed chart bars are designed to keep the values known up to that bar. Last Closed Bar uses the closed value from 1 bar before on that timeframe, so the state is the same while within the same higher-timeframe bar. Recalculation caused by changes in history or settings is an exception.

The 5 numbers in the header

They are rows 1–4 and alignment, in that order. +1 is up, −1 is down and 0 is equal / not aligned, but an empty state that cannot be calculated is also shown as 0 in the header. For a 0 in an individual row, a gray mark means equal; no mark means insufficient calculation.

State values in the data

Individual states are kept as +1, −1 or 0, and alignment as +1 for all up, −1 for all down and 0 otherwise. Insufficient history is an empty state. The 0 in the header alone cannot distinguish this empty state.

No sounds or notifications

The display shows only changes in moving average values. There are no sounds, notifications, or functions that report whether the price is above or below the moving average.

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 is for displaying calculation results on the screen. It does not guarantee future price movement.

9

Troubleshooting and usage notes

Only the top row is blank

This happens when the 4 rows include disagreement or equal values, and when one of them has insufficient history. Check the latest marks of all 4 rows and the display ON/OFF setting.

The weekly row does not appear

With the default W1 21, the guide is from the 2,641st bar on H1 with weekday 24-hour bars. On M1 it is the 158,401st bar, so also pay attention to the limit on the bars loaded.

Colors appear even though the price does not move

The comparison for EMA and SMMA is decided by the calculated values after rounding. Even at prices that look the same, a difference in the last digit can count as up or down.

Cannot start

Check the input ranges. If startup is refused, the reason appears as 1 line in English on the MT5 Experts tab. No panel with the reason appears on the chart. Inputs that are not used are also range-checked.

It does not match other charts

Check the timeframe, the inputs, the start of the history and how the intervals are split. Even an indicator with the same name does not match if it differs in whether values are interim or final, or in the history used for the calculation.

The required history is insufficient

Calculating longer timeframes needs many chart bars. Check the "Max bars in chart" limit and the history actually loaded. Raising the limit alone does not necessarily bring in all history that has not yet been downloaded.

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

Direction comparison

Compares the moving average now with its value 1 bar before; strictly larger is up, smaller is down, and equal is unchanged. Even for EMA and SMMA in periods with no price movement, the direction can be decided by rounding in the last digit of the calculation. Distinguish this from appearing at the same height on screen.

Relation to standard moving averages

Uses the SMA, EMA, SMMA and LWMA formulas, but the higher timeframes are built from the current chart. Especially for EMA and SMMA, if the start of the calculation differs, the values and direction can differ from the standard indicator on another chart. It does not guarantee identical values on all timeframes.

Row order and states

The heights of rows 1–4 are 4, 3, 2 and 1, and the agreement row is 5. The heights are for layout, not the size of values. For the Data Window, there are state labels that include each row's timeframe, method, period and price, and Agreement.

Start of drawing

With Forming Bar, the same timeframe starts from bar period+1, and longer timeframes from the period+2nd interval, counting the first unused interval. Last Closed Bar is 1 bar later in each case. Until all 4 rows can be calculated, the agreement is also not calculated.

Settings that turn off the display

Show Agreement Row switches only how the top row appears. The 5th state in the heading and the calculation of the individual rows remain.