Height
The value of the moving average of the chart timeframe. The period of the line is changed with MA Period.
Draws a moving average of the chart's timeframe and changes its color depending on whether the directions of up to 4 timeframes agree. The height and the color of the line are separate calculations.
The height is the chart's moving averageThe default is period 5, LWMA, Typical. It is not a line that overlays higher-timeframe moving averages.
The color shows agreement of the confirmationsIf all confirmations used are up, it is green; if all are down, red; otherwise gray.
By default, the color is decided by closed barsEven with Last Closed Bar, the height of the latest line changes while the bar is forming.
Compares the default settings and a settings change example on a screen with only this product applied.
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 price scale of the main chart and the positions of the candlesticks.
The value of the moving average of the chart timeframe. The period of the line is changed with MA Period.
All up = green, all down = red. If there is a mix, equal values or a confirmation not yet determined, it is gray.
When Show When Not Aligned is false, the gray parts are not drawn. An isolated value of just 1 bar may not look like a line.
The color is applied by the confirmation results of the selected timeframes, not by the direction of the line itself. There is no rule that a green line always slopes upward.
A moving average built from the chart's prices. The method and price are shared with the confirmation moving averages, while the period is specified separately for the line and for each confirmation.
Only confirmations set to true are counted. All up gives green, all down gives red, and equal, mixed or not calculated gives gray. The values of disabled confirmations are not used.
Decides the direction from the closed moving averages of 1 bar before and the bar before that on each timeframe. The color does not change while the latest bar is forming, but the price of the line moves.
Confirms with the interim higher-timeframe bar known as of each chart bar. The color changes while the latest bar is forming, and with the hide setting the line also appears and disappears.
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.
| Chart timeframe | Line | Confirmation 1 (chart timeframe) | Confirmation 2 (H4) | Confirmation 3 (D1) | First bar that can become green or red |
|---|---|---|---|---|---|
| M1 | 5th bar | 7th bar | 1,681st bar | 10,081st bar | 10,081st bar (0:00 on day 8) |
| M5 | 5 | 7 | 337 | 2,017 | 2,017 |
| M15 | 5 | 7 | 113 | 673 | 673 |
| M30 | 5 | 7 | 57 | 337 | 337 |
| H1 | 5 | 7 | 29 | 169 | 169 |
| H4 | 5 | 7 | 7 (H4 = chart timeframe) | 43 | 43 |
| D1 | 5 | 7 | 7 (replaced with D1) | 7 | 7 |
| W1 | 5 | 7 | 7 (replaced with W1) | 7 (replaced with W1) | 7 |
| MN1 | 5 | 7 | 7 (replaced with MN1) | 7 (replaced with MN1) | 7 |
The line itself starts from bar MA Period. The last column of the table is the point where a color can appear; it is not a guarantee that the line becomes green or red. With Last Closed Bar, a confirmation on the same timeframe starts from bar period+2, and on a longer timeframe from the period+3rd interval, counting the first unused interval. With Forming Bar, each starts 1 bar earlier.
Check the line calculation with MA Period, Method and Price.
Only the Check 1–4 items set to true decide the color. Check the timeframes, periods and the names after replacement.
The default is Last Closed Bar. To include interim values, change it after understanding the difference from Forming Bar.
Turning off Show When Not Aligned makes the line break up. The settings in the example shown are not recommended values.
| Included file | Purpose / location |
|---|---|
| TRI_MTF_Agreement_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'.
Using this product does not require allowing DLLs. When removed, this product's drawings are cleared.
There are 17 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.
InpBarModeInpMaPeriodInpMaMethodInpMaPriceInpUse1InpTf1InpPeriod1InpUse2InpTf2InpPeriod2InpUse3InpTf3InpPeriod3InpUse4InpTf4InpPeriod4InpShowMixedThe 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.
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.
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.
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.
In normal bar progression, the check results known at the time of that bar are used. Even within the same higher-timeframe bar, past chart bars with Forming Bar can have different colors. If history or settings change, the past is also recalculated.
On a bar where the color changes, the segment entering that bar takes the new bar's color. Read the position of the points and the segments between them separately.
The Timeframe and Period of unused checks do not affect the color. However, their input ranges are checked. The 4 checks cannot all be set to false.
It is a color that combines mixed, equal and insufficient check history. Do not read an undetermined direction as the direction of the next price.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
This product is for displaying calculation results on the screen. It does not guarantee future price movement.
Look at the required-history table to see whether the history for the confirmations used is insufficient. Even when all confirmations can be calculated, it is gray while the directions do not agree.
If Show When Not Aligned is false, the line is not drawn on bars not in agreement. When only 1 isolated bar is in agreement, it may also not be visible as a line.
The confirmation periods are conditions for the color. The height is changed by MA Period, Method and Price. However, if Show When Not Aligned=false, the drawn parts change.
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.
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.
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.
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.
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.
The moving average of the chart timeframe is drawn from bar MA Period. EMA also calculates initial values, but nothing is drawn before this number of bars. The default starts from the 5th bar. Until the confirmations can be calculated, the line is gray.
Each confirmation is +1 for up, −1 for down, 0 for equal, and an empty state when it cannot be calculated yet. Agreement is +1 when all are up, −1 when all are down, and 0 otherwise. Disabled confirmations are excluded from what is shown for the Data Window.
With Last Closed Bar, a period 5 confirmation starts from the 7th bar on the same timeframe, and on longer timeframes from the 8th interval, counting the first unused interval. With the default on H1, the D1 confirmation is the last to become available, and the color can be judged from about the 169th bar.