Distinguish the lines from the bars
MACD is RoyalBlue, and Signal is a DarkOrange dotted line. The default bars are SteelBlue.
Shows the difference between 2 moving averages, its average, and the difference between the two as lines and a histogram so they can be read separately.
MACDThe blue line: the difference between the fast MA and the slow MA, multiplied by a multiplier.
SignalA moving average of MACD, shown as an orange dotted line.
HistogramMACD − Signal by default. MACD itself or hidden can also be selected.
Compares the default settings and a settings change example on a screen with only this product applied.
Example shown: 1-minute chart (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 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.
MACD is RoyalBlue, and Signal is a DarkOrange dotted line. The default bars are SteelBlue.
MACD at 0 means the 2 averages are equal; a difference bar at 0 means MACD and Signal are equal.
The meaning of the colors changes with Histogram Colours, and they are not trading signals.
Even under the same name MACD, changing the averaging method or the bar content gives different calculation results. Check the settings first.
The fast, slow and signal averages can each use a different method. LSMA is the regression value, and DEMA is 2×EMA−EMA(EMA).
MACD Multiplier affects MACD and its Signal. Histogram Multiplier applies only to the bars.
Lines can be hidden with Show MACD Line and Show Signal Line. Hiding them does not change the calculation definitions.
| Histogram Colours | Meaning of the colors |
|---|---|
| One Colour | A single SteelBlue color. |
| Above / Below Zero | LimeGreen when the bar is 0 or above, Crimson when it is negative. |
| Rising / Falling | LimeGreen when above the previous bar, Crimson when below. An equal value keeps the previous color, and the first bar uses the rising color. |
| MACD against Zero and Signal | LimeGreen when MACD is above 0 and above Signal. Crimson when it is below both. DimGray in other cases and before Signal is ready. |
| Above / Below Zero and Rising / Falling | At 0 or above, rising is LimeGreen and falling is PaleGreen. When negative, rising is LightSalmon and falling is Crimson. An equal value keeps the previous direction. |
Check the difference between EMA 12 and 26, the SMA 9 Signal, and the difference bars.
If you change Histogram, also re-read the meaning of 0 and of the colors.
Change the line display and the coloring separately, and keep the comparison conditions.
| Included file | Purpose / location |
|---|---|
| TRI_MACD_Plus.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. When comparing different settings, using separate charts makes checking easier.
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 13 inputs. Change them on the Inputs tab of the properties. The English item names defined in the source are shown together with the input names.
InpFastPeriodInpSlowPeriodInpSignalPeriodInpFastMethodInpSlowMethodInpSignalMethodInpPriceInpMacdMultiplierInpHistogramInpHistMultiplierInpColorModeInpShowMacdLineInpShowSignalLineThe current bar is included in the calculation. The latest displayed values change with price updates.
There is no function to specify a higher timeframe. Changing the timeframe or the history range also changes what is calculated.
MACD is shown once both MAs can be calculated, and the difference bars once Signal can be calculated. EMA and DEMA start from the beginning of the series, so not every setting waits dozens of bars.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
Check the input ranges and the number of history bars. If an input is out of range, loading is refused and the reason is written to the Experts log.
Check the combination with the background and the display scale. Details of the published images can be checked in the full-size view.
With Histogram = None, Show MACD Line = false and Show Signal Line = false, no calculated lines or bars are displayed.
If the value is 0, the bar height is also 0. Check the content of the lines and bars.
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.
EMA and DEMA use the first value of the series as the seed. SMA, LWMA, LSMA and SMMA start once the bars for the period are available. Signal is calculated starting from the position where MACD begins.
Rising / Falling carries over the previous color, and the 4 colors by sign and slope carry over the previous direction. The first valid bar takes the rising direction.
Close = close, Open = open, High = high, Low = low, Median = (high + low)/2, Typical = (high + low + close)/3, Weighted = (high + low + close×2)/4. Simple is a simple average, Exponential is exponential smoothing, Smoothed is a smoothed moving average, and Linear Weighted is an average that weights newer bars more heavily.
The inputs and calculations in this document are based on the product's implementation. The actual display in the Data Window and the input screen, and how it looks during long operation on actual symbols or with long history, have not been verified.