MACD Four Color Histogram with Alerts MT4

A MetaTrader 4 MACD built to read like the MACD you see on TradingView: a MACD line, a signal line, and a histogram of the gap between them, colored in four shades. If you switch between the two platforms during the day, the MACD pane on your MT4 chart will look and behave the way you are used to.

WHY NOT THE MT4 BUILT-IN MACD?
MT4's own MACD draws the MACD line as gray bars and smooths the signal line with an SMA. There is no separate histogram and no color change. This indicator calculates the three parts the TradingView way (EMA seeded with an SMA, histogram = MACD minus signal) and colors every histogram bar.

READING THE FOUR COLORS (default colors)
- Dark green: histogram above zero and larger than on the previous bar
- Light green: histogram above zero and smaller than on the previous bar
- Light red: histogram below zero and higher than on the previous bar
- Dark red: histogram below zero and lower than on the previous bar
Blue = MACD line, orange = signal line, gray dashed line = zero.

CHANGING COLORS ON MT4 - PLEASE READ
Change colors in the Inputs tab (the color inputs listed under Inputs below). Changes made in MT4's Colors tab are not applied: the indicator sets its colors from the Inputs every time it loads. To hide the zero line, set "Zero line" to None (clrNONE).

INPUTS (in the order shown in the Inputs tab; MT4 shows them without group headings)
- Fast length = 12, Slow length = 26, Signal smoothing = 9 (each 1 to 1000)
- Source = close (also open, high, low, hl2, hlc3, ohlc4, hlcc4)
- Oscillator MA type = EMA, Signal line MA type = EMA (EMA or SMA, set separately)
- Histogram colors (4), MACD line, Signal line, Zero line
- Alert: MACD crosses signal line = false
- Alert: MACD line crosses zero = false
- Alert by pop-up = true, Alert by sound = false, Alert by push notification = false
- Alert language = Auto (terminal language), or English / Japanese
If an input is out of range (for example a length of 0 or above 1000), the indicator stops loading and writes the reason to the Experts log instead of drawing wrong values.

ALERTS
Both alert types are off until you switch them on.
- MACD / signal cross: raised when the histogram changes from negative to positive or from positive to negative.
- MACD zero cross: raised when the MACD line moves to the other side of zero.
- Judged on the closed bar only, at most once per bar.
- Bars that closed before the indicator was loaded never trigger an alert, so adding it to a chart or restarting MT4 does not produce a burst of old alerts.
- Pop-up, sound and push can be combined. Push needs your MetaQuotes ID in the terminal options.
- The alert text is in Japanese or English and follows the terminal language automatically.
An alert tells you that a condition on the indicator occurred. It is not advice to buy or sell.

TESTS ON MT4
- Values against an independent reference calculation of the TradingView MACD formula: largest difference 7.4e-13 (floating-point rounding).
- Histogram colors: 0 mismatches in 33 test cases, including W1 and MN1 charts.
- Speed: about 50 ms for the first calculation on 65,000 M1 bars in our test. Your PC may differ.
- Closed bars do not repaint. The bar that is still forming keeps changing until it closes, as with any MACD.
Note: price data is not the same at every data feed, so the numbers on your chart can differ slightly from a TradingView chart or another MT4 terminal. The formula is the same; the prices may not be. The EMA also depends on where your chart history begins; after a few hundred bars this hardly matters.

FOR EA AND iCUSTOM USERS
MT4 has no multi-color histogram, so the four colors are drawn by four histogram buffers, and each bar has a value in only one of them.
- 0 = histogram value (all bars, not drawn)
- 1 = dark green, 2 = light green, 3 = light red, 4 = dark red (value only on bars of that color, otherwise EMPTY_VALUE)
- 5 = MACD line, 6 = signal line
The Data Window shows only Histogram, MACD and Signal.

LIMITS
- Analysis tool only: it does not open, close or manage trades, and it does not guarantee any result.
- Uses no DLLs, no external files and no internet connection. It draws no chart objects.
- Inside the Strategy Tester it raises no alerts.

SUPPORT
Questions about installing, settings and bugs are welcome through MQL5 messages. Questions about market direction or about individual trades are outside the support scope.

This tool belongs to a series that brings TradingView-style indicators to MetaTrader. Other titles include RSI AutoScale with Zone Fills MT4 and Stoch RSI Band Fill with Cross Alerts. Please see my seller profile for the full list.

TradingView is a trademark of TradingView, Inc. This product is not affiliated with, sponsored by or endorsed by TradingView, Inc.

Другие продукты этого автора
Elliott Wave Auto Count labels Elliott waves automatically on four degrees at the same time: the base degree and the three degrees above it. It follows the rules and guidelines of "Elliott Wave Principle" (Frost & Prechter). For the current wave it also shows a price x time target zone and an invalidation level. This is the MetaTrader 4 version; the counting logic is the same as in the MetaTrader 5 version (sold separately). HOW IT WORKS 1. Swings: five ATR(100)-based zigzags. Each higher degr
Fibo Price Time Zones combines Fibonacci price levels with Fibonacci time targets and draws them on the chart as boxes (price x time zones). It helps you organize which price areas to watch and roughly when. Where boxes from several waves and from higher timeframes overlap, the area is emphasized in three levels. Base waves are built only from confirmed swings, so a confirmed box does not move afterwards (see the conditions below). WHAT IT DRAWS - Price levels: retracement 38.2 / 50 / 61.8 / 7
RSI AutoScale is a clean, lightweight RSI for traders who use both TradingView and MetaTrader 5 and want the two charts to look the same. WHAT IT SHOWS - RSI (Wilder smoothing): the same values as the standard RSI, with any applied price. - Signal line on the RSI: SMA, EMA, SMMA or LWMA, with its own period. - Levels: upper, middle and lower lines (70 / 50 / 30 by default). They use MT5's native levels, so they reach the right edge and their values appear on the scale. - Zone fills: the middle
FREE
Dow Structure MTF shows the Dow theory trend structure of five timeframes at the same time, using the pullback low / rally high approach that is common among Japanese traders. For each timeframe you see whether the trend is up, down or range, which price would change it, and how far the current price is from that level. Only closed bars are used, so a confirmed result never changes afterwards (no repaint). This is the MetaTrader 4 version; the logic, inputs, display and alerts are the same as i
Fibo Price Time Zones combines Fibonacci price levels with Fibonacci time targets and draws them on the chart as boxes (price x time zones). It helps you organize which price areas to watch and roughly when. Where boxes from several waves and from higher timeframes overlap, the area is emphasized in three levels. Base waves are built only from confirmed swings, so a confirmed box does not move afterwards (see the conditions below). This is the MetaTrader 4 version; the calculation, inputs, defa
Time Average Lines draws four averages that are measured by time, not by the number of bars. When you switch timeframes, each line still averages the same length of time. The main line (3) averages how far price had moved from the day's open at the same clock time on past days, and the rest of today is shown as a dotted path that joins those past averages. The path is a summary of the past, not a forecast. THE FOUR LINES - (1) Time MA: average close of the bars that started within the last N m
Auto Trendline Channel MTF draws trendlines, parallel channels and horizontal support / resistance automatically from confirmed swing highs and lows. For each line it records the touch count, close breaks, wick breaks and retests. A table shows, for the chart timeframe and two higher timeframes, the nearest line above and below the price, the distance to it and the Dow theory direction. Touch counts and break records describe what happened on the past chart. They do not tell whether price will
Currency Strength Meter MTF combines the 28 pairs of the 8 major currencies (USD, EUR, JPY, GBP, AUD, NZD, CAD, CHF) into one strength value per currency. It draws 8 lines in a subwindow and shows a ranking table for the chart timeframe, M15, H1, H4 and D1. This is the MetaTrader 4 version; the formula, inputs, defaults, display and alerts are the same as in the MetaTrader 5 version (sold separately). The full formula is published below. The indicator shows the relative strength of past price c
Trade History Stats Panel for MetaTrader 4 reads the closed trades in your own account history and sums them up in a panel on the chart: number of trades, win rate, profit factor, average P/L per trade, drawdown of the closed-trade curve, holding time, buy / sell, and tables by month, symbol, weekday and hour. It is a record-keeping tool for looking back at your past trades, like a trading journal that fills itself in. It never places, modifies or closes orders, and it gives no buy / sell signa
Prop Challenge Loss Tracker for MetaTrader 4 shows, in a panel on the chart, how much room is left before the daily loss limit and the maximum loss limit of a funded-account (prop) challenge are reached, and sends staged alerts as the limits are used up. It is a display and alert tool only: it never opens, modifies or closes any order. Whether a limit is exceeded depends entirely on your own trading and on your own actions after an alert. WHAT IT SHOWS - Status of the whole account in one word
Market Structure & Liquidity Map draws SMC-style (smart money concepts) market structure and liquidity levels on the chart, and sums them up in a small table for the chart timeframe and two higher timeframes. It is a display tool that helps you organize where the structure has changed and which highs and lows have not been taken yet. It gives no buy / sell signals. Only closed bars are used, processed one by one from a fixed start, so confirmed drawings do not repaint (see the notes below). Thi
This is the MetaTrader 4 edition of RSI AutoScale. It draws the standard Wilder RSI with a signal line, a shaded band between the levels, colored areas where the RSI leaves that band, and a choice of three scales. It is meant for traders who use TradingView and MetaTrader 4 side by side and want the RSI pane to look much the same on both. HOW IT LOOKS ON MT4 - RSI line: the same values as MT4's built-in RSI for the same period and applied price. - Signal line: a moving average of the RSI (SMA, E
FREE
Divergence Detector finds regular and hidden divergences between price swings and one oscillator of your choice (RSI, MACD histogram, Stochastic %K, OBV, CCI or Momentum). It draws them as lines on the price chart and in the indicator window, and a small table shows the latest divergence on four other timeframes. It is a display tool: it gives no buy / sell signals and does not place orders. HOW A DIVERGENCE IS FOUND - Swings are price pivots: a high that is higher than the 5 bars on its left a
Multi Symbol Market Scanner Panel shows up to 30 symbols in one table on your MT4 chart: trend direction, RSI, volatility, today's range, distance from yesterday's high / low and a simple swing structure, on M15, H1, H4 and D1. It is a display tool for checking many symbols at once without opening many charts. It gives no buy / sell signals and never places orders. WHAT THE TABLE SHOWS - Rows: the symbols in your Market Watch (the first 30), or your own comma-separated list (up to 30). For a l
Session & Key Levels draws trading sessions (Asia, London, New York and one optional extra session) as boxes with their high, low and open lines, and adds key levels: previous day / week / month high and low, week and month open, and round numbers. The highs and lows of finished sessions are extended to the right until price takes them, then they stop and fade. A small panel shows the current session and each session's latest range compared with its recent average. It is a display tool: it give
Risk and Lot Size Calculator works out the lot size for the amount you are prepared to lose. Drag three lines on the chart (entry, stop loss, take profit) and the panel shows the lot size, the money at risk, the profit at the take profit, the risk:reward ratio and the margin required. This is the MetaTrader 4 version. It is a calculation and display tool only: it never opens, modifies or closes any order. The numbers are an estimate; the real fill, profit/loss and margin are decided by your bro
MetaTrader 4 ships with a Stochastic and an RSI, but not with a Stochastic RSI. This indicator fills that gap for MT4 users and is built to be TV-compatible: it follows the calculation of the Stoch RSI that comes with TradingView, and the pane looks the way TradingView users expect - a blue K line, an orange D line, dashed 80 and 20 levels, a dotted 50 line and a light band between 80 and 20. WHAT APPEARS IN THE SUBWINDOW - K and D lines. The Data Window lists only K and D. - Upper band (80) a
FREE
Gold Pullback EA is a simple trend-following robot for XAUUSD (gold). It waits for the daily trend, buys or sells the pullback on H4, and lets winners run with an ATR trailing stop. HOW IT TRADES - Trend filter (D1): long only when EMA50 > EMA200 and the daily close is above EMA50; short only in the opposite case. - Entry (H4): price pulls back to EMA20 within the last 3 bars, then an H4 bar closes back beyond EMA20 and beyond the previous bar's high (low for shorts). - Stop loss: below the la
Elliott Wave Auto Count labels Elliott waves automatically on four degrees at the same time: the base degree and the three degrees above it. It follows the rules and guidelines of "Elliott Wave Principle" (Frost & Prechter). For the current wave it also shows a price x time target zone and an invalidation level. HOW IT WORKS 1. Swings: five ATR(100)-based zigzags. Each higher degree uses a larger swing threshold. The finest zigzag is hidden and is used only to count the sub-waves inside each l
Dow Structure MTF shows the Dow theory trend structure of five timeframes at the same time, using the pullback low / rally high approach that is common among Japanese traders. For each timeframe you see whether the trend is up, down or range, which price would change it, and how far the current price is from that level. Only closed bars are used, so a confirmed result never changes afterwards (no repaint). WHAT YOU SEE - Table of five timeframes (M15, H1, H4, D1, W1 by default, all changeable)
Time Average Lines draws four averages that are measured by time, not by the number of bars. When you switch timeframes, each line still averages the same length of time. The main line (3) averages how far price had moved from the day's open at the same clock time on past days, and the rest of today is shown as a dotted path that joins those past averages. The path is a summary of the past, not a forecast. THE FOUR LINES - (1) Time MA: average close of the bars that started within the last N m
Auto Trendline Channel MTF draws trendlines, parallel channels and horizontal support / resistance automatically from confirmed swing highs and lows. For each line it records the touch count, close breaks, wick breaks and retests. A table shows, for the chart timeframe and two higher timeframes, the nearest line above and below the price, the distance to it and the Dow theory direction. Touch counts and break records describe what happened on the past chart. They do not tell whether price will
Currency Strength Meter MTF combines the 28 pairs of the 8 major currencies (USD, EUR, JPY, GBP, AUD, NZD, CAD, CHF) into one strength value per currency. It draws 8 lines in a subwindow and shows a ranking table for the chart timeframe, M15, H1, H4 and D1. The full formula is published below. The indicator shows the relative strength of past price changes calculated by a fixed formula. It is an analysis aid. It does not tell you when to buy or sell, and it does not show future price movement.
Trade History Stats Panel reads the closed trades in your own account history and sums them up in a panel on the chart: number of trades, win rate, profit factor, average P/L per trade, drawdown of the closed-trade curve, holding time, buy / sell, and tables by month, symbol, weekday and hour. It is a record-keeping tool for looking back at your past trades, like a trading journal that fills itself in. It never places, modifies or closes orders, and it gives no buy / sell signals. WHAT IT SHOW
Prop Challenge Loss Tracker shows, in a panel on the chart, how much room is left before the daily loss limit and the maximum loss limit of a funded-account (prop) challenge are reached, and sends staged alerts as the limits are used up. It is a display and alert tool only: it never opens, modifies or closes any order. Whether a limit is exceeded depends entirely on your own trading and on your own actions after an alert. WHAT IT SHOWS - Status of the whole account in one word and one color: O
Market Structure & Liquidity Map draws SMC-style (smart money concepts) market structure and liquidity levels on the chart, and sums them up in a small table for the chart timeframe and two higher timeframes. It is a display tool that helps you organize where the structure has changed and which highs and lows have not been taken yet. It gives no buy / sell signals. Only closed bars are used, processed one by one from a fixed start, so confirmed drawings do not repaint (see the notes below). Th
MACD Four Color Histogram is a MACD for MetaTrader 5 that uses the same formula and the same look as the built-in MACD on TradingView. It is made for traders who use both platforms and want the MACD on each chart to read the same way. HOW IT DIFFERS FROM THE MT5 STANDARD MACD - MT5 standard MACD: the histogram is the MACD line itself, and the signal line is an SMA. - This indicator: three parts, as on TradingView. MACD line, signal line, and histogram = MACD - signal. The histogram has 4 colors.
FREE
Stoch RSI Band Fill is a Stochastic RSI indicator for MetaTrader 5. MT5 does not include a built-in Stoch RSI, so this indicator adds one. It follows the same calculation steps as the built-in Stoch RSI on TradingView and uses the same layout: K and D lines, 80 / 50 / 20 levels and a shaded band between the upper and lower levels. CALCULATION, STEP BY STEP 1. RSI of the selected price (default: close, length 14), smoothed with Wilder's method (RMA). The first average is the simple average of the
FREE
Divergence Detector finds regular and hidden divergences between price swings and one oscillator of your choice (RSI, MACD histogram, Stochastic %K, OBV, CCI or Momentum). It draws them as lines on the price chart and in the indicator window, and a small table shows the latest divergence on four other timeframes. It is a display tool: it gives no buy / sell signals and does not place orders. HOW A DIVERGENCE IS FOUND - Swings are price pivots: a high that is higher than the 5 bars on its left a
Risk and Lot Size Calculator works out the lot size for the amount you are prepared to lose. Drag three lines on the chart (entry, stop loss, take profit) and the panel shows the lot size, the money at risk, the profit at the take profit, the risk:reward ratio and the estimated margin. It is a calculation and display tool only: it never opens, modifies or closes any order. The numbers are an estimate; the real fill, profit/loss and margin are decided by your broker's conditions. HOW IT WORKS -
Фильтр:
Нет отзывов
Ответ на отзыв