MT5 indicators← Four Indicator Agreement Marks 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

Four Indicator Agreement Marks

Shows each bar where the 4 conditions of moving average order, RSI, Stochastic and MACD all line up. Not only the first 1 bar: while the agreement continues, a mark is placed on every bar.

Indicator name: Four Indicator Agreement MarksMetaTrader 5Main chart

How to read the display

1Check the moving averages and RSI2Stochastic and MACD also agree3Marks on every bar that agrees
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Check the moving averages and RSIThe upper side is LWMA>SMA and RSI at or above the upper level. The lower side is LWMA<SMA and RSI at or below the lower level.

2

Stochastic and MACD also agreeThe upper side is %K>%D and MACD>signal line; the lower side is the reverse for both. It is not a method that uses whether MACD is positive or negative as a condition.

3

Marks on every bar that agreesOnly green up arrows and red down arrows are shown. The lines of the 4 indicators are internal calculations, and no lines are drawn in a separate window.

Record of conditions metMT5 onlyNot a trading instruction
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
LWMA period / Fast LWMA Period
InpFastLwma
10 → 5
SMA period / Slow SMA Period
InpSlowSma
20 → 10
RSI period / RSI Period
InpRsiPeriod
28 → 14
Stochastic search period / Stochastic %K Period
InpKPeriod
10 → 5
Stochastic signal line period / Stochastic %D Period
InpDPeriod
6 → 3
Stochastic smoothing bars / Stochastic Slowing
InpSlowing
6 → 3
MACD Fast EMA period / MACD Fast EMA
InpMacdFast
24 → 12
MACD Slow EMA period / MACD Slow EMA
InpMacdSlow
52 → 26
SMA period of the MACD signal line / MACD Signal SMA
InpMacdSignal
18 → 9

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 settingsInpFastLwma = 10 / InpSlowSma = 20 / InpRsiPeriod = 28 / InpKPeriod = 10 / InpDPeriod = 6 / InpSlowing = 6 / InpMacdFast = 24 / InpMacdSlow = 52 / InpMacdSignal = 18
Four Indicator Agreement Marks default settings
Default periods: MA 10/20, RSI 28, Stochastic 10/6/6, MACD 24/52/18. Marks continue while the 4 conditions agree, so adjacent arrows overlap.
View the screen in detail at full size
Four Indicator Agreement Marks default settings (full size)
Settings change exampleInpFastLwma = 5 / InpSlowSma = 10 / InpRsiPeriod = 14 / InpKPeriod = 5 / InpDPeriod = 3 / InpSlowing = 3 / InpMacdFast = 12 / InpMacdSlow = 26 / InpMacdSignal = 9
Four Indicator Agreement Marks settings change example
All 9 period settings were halved. The RSI levels 55/45, the price range Low/High and Closed Bars Only=true were not changed. This example changes all the periods together; it is not a comparison that shows the effect of only 1 setting.
View the screen in detail at full size
Four Indicator Agreement Marks settings change example (full size)

Example shown: M1. This is an example for explaining the display. The published images are screens from before the brand display was added. The calculation and drawing conditions are the same, and the packaged version has display settings for the brand text and the QR code. 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

Check the moving averages and RSI

The upper side requires LWMA>SMA and RSI at or above the upper level. The lower side requires LWMA<SMA and RSI at or below the lower level.

Stochastic and MACD also agree

The upper side requires %K>%D and MACD>signal line; the lower side requires the opposite of both. The sign of MACD (positive or negative) is not used as a condition.

Marks on every bar that agrees

Only green up arrows and red down arrows are shown. The lines of the 4 indicators are internal calculations; no lines are drawn in a separate window.

3

What it measures

Shows each bar where the 4 conditions of moving average order, RSI, Stochastic and MACD all line up. Not only the first 1 bar: while the agreement continues, a mark is placed on every bar.

How the calculation works

The conditions for a green up arrow are: (1) LWMA>SMA of the close, (2) RSI of the close>=RSI Upper Level, (3) Stochastic %K>%D, (4) MACD>MACD signal line. For a red down arrow: (1) LWMA<SMA, (2) RSI<=RSI Lower Level, (3) %K<%D, (4) MACD<signal line. The RSI comparison includes a value equal to the level; the other 3 comparisons do not include equality. An arrow is shown only when all 4 are met on the same bar. A mismatch on the previous bar is not required, and neither a change of direction nor a crossover just before is required. Because the up and down MA conditions cannot both hold at once, up and down marks never appear on the same bar.

Conditions and exceptions

Does not evaluate until all values can be calculated. With the default settings, evaluation is possible from the 29th bar of the history. It does not wait to collect the 52 bars of MACD Slow; the EMA starts from the first close in the history. If the conditions do not match, there is no mark even from the 29th bar onward. The start position changes with the settings. The latest bar is subject to Closed Bars Only. Because the full history is recalculated every time, corrections to the history or a change of start position may change past values and marks.

Moving averages and MACD

LWMA gives the latest close a weight equal to the period and uses weights down to 1 for older bars. SMA is the simple average of the close. MACD is the difference of 2 EMAs started from the oldest close, and the signal line is its SMA.

RSI and Stochastic

RSI starts from the simple averages of the gains and losses over the first period; after that, it multiplies the previous average by (period−1), adds the current change and divides by the period. Stochastic %K is the sum of (close − lowest value) over Slowing bars divided by the sum of the ranges, as a percentage; %D is its SMA.

4

Situations for reading the display

Reading the agreement of 4 conditions

Indicator
All 4 are required, not just any 1 of them.
Cross-check
Cross-check the MA, RSI, Stochastic and MACD on the same bar.
Check
If the agreement continues, a mark appears on every bar, so do not count only the first crossover.
Caution
The number or density of marks is not a number of trades or a strength score.

Compare setting differences

Indicator
All 9 period settings were halved. The RSI levels 55/45, the price range Low/High and Closed Bars Only=true were not changed. This example changes all the periods together; it is not a comparison that shows the effect of only 1 setting.
Cross-check
Use the same symbol, timeframe and history.
Check
Look at how the changed setting relates to the increase or decrease and the position of the marks.
Caution
The published settings are not recommended values.

Reading intervals without marks

Indicator
Does not evaluate until all values can be calculated. With the default settings, evaluation is possible from the 29th bar of the history. It does not wait to collect the 52 bars of MACD Slow; the EMA starts from the first close in the history. If the conditions do not match, there is no mark even from the 29th bar onward. The start position changes with the settings. The latest bar is subject to Closed Bars Only. Because the full history is recalculated every time, corrections to the history or a change of start position may change past values and marks.
Cross-check
Check the required history and whether the conditions are met.
Check
Do not treat the absence of marks as the calculation having stopped.
Caution
Nothing may be displayed during periods when the conditions are not met.
5

Steps for checking the display

1

Apply with the defaults

Load the history in MT5, and first apply only this product to the chart.

2

Check the role of the display

The upper side requires LWMA>SMA and RSI at or above the upper level. The lower side requires LWMA<SMA and RSI at or below the lower level.

3

Comparing settings

Put the default and the change example on separate charts, with the same symbol, timeframe and history.

4

Distinguish the forming bar

Closed Bars Only defaults to true. With false, marks on the forming bar can change, so distinguish them from the record on closed bars.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Four_Indicator_Agreement_Marks.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. When comparing different settings, using separate charts makes checking easier.

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 17 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.

LWMA period

English item name
Fast LWMA Period
Input name
InpFastLwma
Default
10
Allowed range
Integer 1–500
Description
Default 10. A weighted moving average of the close. Newer bars get more weight. Although it is named Fast, it is not restricted to a period shorter than the SMA.

SMA period

English item name
Slow SMA Period
Input name
InpSlowSma
Default
20
Allowed range
Integer 1–500
Description
Default 20. A simple moving average of the close. Even with the same period as the LWMA, the calculation method is different.

RSI period

English item name
RSI Period
Input name
InpRsiPeriod
Default
28
Allowed range
Integer 1–500
Description
Default 28. Calculated from the gains and losses of the close.

RSI upper level

English item name
RSI Upper Level
Input name
InpRsiUpper
Default
55
Allowed range
Finite number from 0 to 100
Description
Default 55. An up arrow requires RSI to be at or above this value. There is no input restriction on the order of Upper and Lower.

RSI lower level

English item name
RSI Lower Level
Input name
InpRsiLower
Default
45
Allowed range
Finite number from 0 to 100
Description
Default 45. A down arrow requires RSI to be at or below this value. Even if the levels are reversed, the other 3 conditions are not skipped.

Stochastic lookback period

English item name
Stochastic %K Period
Input name
InpKPeriod
Default
10
Allowed range
Integer 1–500
Description
Default 10. The period over which the highest and lowest of the price range are searched.

Stochastic signal line period

English item name
Stochastic %D Period
Input name
InpDPeriod
Default
6
Allowed range
Integer 1–500
Description
Default 6. %D is made as the simple average of %K. With 1, %K=%D, so the strict comparison condition is not met and no marks appear.

Stochastic slowing bars

English item name
Stochastic Slowing
Input name
InpSlowing
Default
6
Allowed range
Integer 1–500
Description
Default 6. %K is made by dividing the sum of the differences between each bar's close and the lowest value by the sum of the ranges.

Stochastic price range

English item name
Stochastic Price Field
Input name
InpPriceField
Default
Low/High
Allowed range
Low/High / Close/Close
Description
The default Low/High finds the range from the high and low; Close/Close finds it from the highest and lowest close. The other 3 indicators use the close.

MACD Fast EMA period

English item name
MACD Fast EMA
Input name
InpMacdFast
Default
24
Allowed range
Integer 1–500
Description
Default 24. An EMA of the close. It is not limited to a period shorter than Slow.

MACD Slow EMA period

English item name
MACD Slow EMA
Input name
InpMacdSlow
Default
52
Allowed range
Integer 1–500
Description
Default 52. MACD is Fast EMA−Slow EMA. If the same period is used, the difference becomes 0 and no marks appear.

SMA period of the MACD signal line

English item name
MACD Signal SMA
Input name
InpMacdSignal
Default
18
Allowed range
Integer 1–500
Description
Default 18. The simple average of MACD. With 1, MACD=signal line and no marks appear.

Hide marks on the forming bar

English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
Default true. No mark is placed on the latest bar. With false, marks are also placed on the forming bar, and they may appear, disappear or change direction as the price moves.

Brand and QR

English item name
Show Trilogy brand and QR code
Input name
InpTriBrandShow
Default
true
Allowed range
true / false
Description
Displayed with true. Calculated values do not change.

Brand position

English item name
Brand position (chart corner)
Input name
InpTriBrandCorner
Default
Bottom left
Allowed range
Top left / Bottom left / Bottom right / Top right
Description
The default is bottom left.

Horizontal margin

English item name
Brand horizontal offset (pixels)
Input name
InpTriBrandX
Default
10
Allowed range
Integer (pixels)
Description
Negative values are treated as 0, and values above 4000 are treated as 4000.

Vertical margin

English item name
Brand vertical offset (pixels)
Input name
InpTriBrandY
Default
10
Allowed range
Integer (pixels)
Description
Negative values are treated as 0, and values above 4000 are treated as 4000.
8

Usage specifications

Display only

It does not place, modify or close orders. There are no notifications or emails either.

Closed bars and history

Does not evaluate until all values can be calculated. With the default settings, evaluation is possible from the 29th bar of the history. It does not wait to collect the 52 bars of MACD Slow; the EMA starts from the first close in the history. If the conditions do not match, there is no mark even from the 29th bar onward. The start position changes with the settings. The latest bar is subject to Closed Bars Only. Because the full history is recalculated every time, corrections to the history or a change of start position may change past values and marks.

Mark positions

Up arrows are drawn 10 pixels below the low, and down arrows 10 pixels above the high. This is not a fixed distance in price.

Brand display

Shows Produced by Trilogy Inc. and a QR code to https://www.trgy.co.jp/. When the same medium is used on the same chart, the display is shared. There is no account authentication.

Internal lines are not drawn

This product draws only the up and down arrows. If you want to check DI, ADX, moving averages and so on as values separately, display each indicator separately and check its calculation method and settings.

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 marks, or blanks in the middle

Does not evaluate until all values can be calculated. With the default settings, evaluation is possible from the 29th bar of the history. It does not wait to collect the 52 bars of MACD Slow; the EMA starts from the first close in the history. If the conditions do not match, there is no mark even from the 29th bar onward. The start position changes with the settings. The latest bar is subject to Closed Bars Only. Because the full history is recalculated every time, corrections to the history or a change of start position may change past values and marks.

The input is not accepted

Check the ranges and combinations in the settings. Keep the inputs for unused methods within range as well.

The marks differ from other cross indicators

The conditions for a green up arrow are: (1) LWMA>SMA of the close, (2) RSI of the close>=RSI Upper Level, (3) Stochastic %K>%D, (4) MACD>MACD signal line. For a red down arrow: (1) LWMA<SMA, (2) RSI<=RSI Lower Level, (3) %K<%D, (4) MACD<signal line. The RSI comparison includes a value equal to the level; the other 3 comparisons do not include equality. An arrow is shown only when all 4 are met on the same bar. A mismatch on the previous bar is not required, and neither a change of direction nor a crossover just before is required. Because the up and down MA conditions cannot both hold at once, up and down marks never appear on the same bar.

Displays overlap

Use separate charts, or adjust the brand position and margins. The images can also be checked at full size.

Settings are valid but no marks appear

With MACD Fast=Slow, MACD Signal=1, Stochastic %D=1, or both of the 2 MA periods at 1, the required strict comparisons cannot hold. Even if values are within range, marks do not necessarily appear.

Marks appear in a row and overlap

A mark is drawn on every bar where the conditions agree. Zoom in horizontally to check the position on each bar. There is no setting to thin out arrows or show only the first one.

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

Calculation and reference range

The conditions for a green up arrow are: (1) LWMA>SMA of the close, (2) RSI of the close>=RSI Upper Level, (3) Stochastic %K>%D, (4) MACD>MACD signal line. For a red down arrow: (1) LWMA<SMA, (2) RSI<=RSI Lower Level, (3) %K<%D, (4) MACD<signal line. The RSI comparison includes a value equal to the level; the other 3 comparisons do not include equality. An arrow is shown only when all 4 are met on the same bar. A mismatch on the previous bar is not required, and neither a change of direction nor a crossover just before is required. Because the up and down MA conditions cannot both hold at once, up and down marks never appear on the same bar.

Initial values and exceptions

Does not evaluate until all values can be calculated. With the default settings, evaluation is possible from the 29th bar of the history. It does not wait to collect the 52 bars of MACD Slow; the EMA starts from the first close in the history. If the conditions do not match, there is no mark even from the 29th bar onward. The start position changes with the settings. The latest bar is subject to Closed Bars Only. Because the full history is recalculated every time, corrections to the history or a change of start position may change past values and marks.

Package contents and dependencies

Only MT5 itself and this manual. Account authentication, external indicators and DLLs are not required.

Starting position

With the oldest bar in history as index 0, evaluation starts at max(Fast LWMA−1, Slow SMA−1, RSI Period, %K Period+Slowing+%D Period−3, MACD Signal−1). This is 28 for the default and 14 for the change example, so evaluation is possible from the 29th bar and the 15th bar respectively. Whether the conditions hold is a separate matter from how the latest bar is handled.

Range 0 and initial values

For RSI, if the average loss is 0 and there is an average gain, the value is 100; if both are 0, it is 50. If the total Stochastic range is 0, %K=100. The MACD EMAs start from the oldest close and do not wait for Fast/Slow Period bars.

Input combinations

Fast<Slow for periods and RSI Upper>Lower are not enforced. Only the RSI comparison includes equality. The other comparisons are strict, and even small differences count in the condition check.