The macd 2 line indicator strips the study back to what MetaTrader does not give you by default. Two lines, drawn properly, at the textbook settings. No histogram competes for attention, and every crossing between them gets a mark.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Separate window (levels 0) |
| Plots | 4: MACD, Signal, BUY, SELL |
| Alerts | popup, push notification, email, sound |
| Inputs | 10 |
What the MACD 2 Line Indicator draws on the chart
A magenta `MACD` line and a gold `Signal` line share the pane.
A zero level runs through the middle.
`BUY` uses arrow 233 and `SELL` uses 234 at each crossing.
No histogram ships here, which is the whole point of the build.
- MACD: line, magenta, width 2
- Signal: line, gold, width 2
- BUY: arrow, lime, width 2, arrow code 233
- SELL: arrow, red, width 2, arrow code 234

How the MACD 2 Line Indicator calculates its values
The terminal supplies both lines
iMACD returns the main and signal buffers at `FastPeriod` `12`, `SlowPeriod` `26` and `SignalPeriod` `9` on `AppliedPrice` `PRICE_CLOSE`. Those are the values Gerald Appel published.
Why two lines rather than one plus bars
MetaTrader’s built-in version draws the main line as a histogram. That hides where the two lines actually cross. Plotting both as lines restores the reading most books describe.
Crossings, without a zero filter
The test compares the pair on this bar and the one before. Every swap earns a mark, wherever it sits on the scale. Builds that accept crossings on only one side of zero work differently.
How to read the signals
A crossing far from zero usually happens inside an established move.
A crossing close to zero often marks a market with no direction at all.
Both lines lag price, and the signal lags the main line again.
The zero level shows whether the fast average sits above the slow one.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` is the top switch and arrives true alongside `EnablePopup`. `EnablePushNotify` delivers to the mobile app, `EnableEmail` delivers by mail and `EnableSound` plays `SoundFile`. Those three start off. Each crossing reports once per bar.
Every MACD 2 Line Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
FastPeriod |
Bars in the fast average, default `12`. | 12 |
SlowPeriod |
Bars in the slow average, default `26`. | 26 |
SignalPeriod |
Bars in the signal average, default `9`. | 9 |
AppliedPrice |
Price the study reads, default `PRICE_CLOSE`. | PRICE_CLOSE |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Top switch for every route, default `true`. | on |
EnablePopup |
Window inside the terminal, default `true`. | on |
EnablePushNotify |
Delivery to the mobile app, default `false`. | off |
EnableEmail |
Delivery by mail, default `false`. | off |
EnableSound |
Delivery as a clip, default `false`. | off |
SoundFile |
Name of that clip, default `”alert.wav”`. | alert.wav |

Settings that fit your chart
The 12, 26 and 9 combination was designed for daily bars. EURUSD H1 is the reference chart, where crossings come every day or two. On M5 they arrive constantly. Daily charts give the study as its author intended it.
When the MACD 2 Line Indicator fails
Every crossing gets a mark, including the ones inside a flat range.
Three averages stacked together put each mark well behind the turn.
Without a histogram, the size of the gap is harder to judge at a glance.
Copy the compiled MACD 2 Line Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Background reading on the method behind the MACD 2 Line Indicator: Accumulation Distribution Line at StockCharts ChartSchool, ISDAfix on Wikipedia.
Download the MACD 2 Line Indicator for MT4 and MT5
The zip holds the compiled MACD 2 Line Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
Why does MetaTrader draw MACD differently?
The built-in version plots the main line as a histogram and the signal as a line. That makes the crossing hard to see. This build draws both as lines, which is how most books describe the study.
What does SignalPeriod 9 average?
The MACD line itself, not price. Nine bars of it produces the gold line, and the gap between the two is what a histogram would normally show. Lengthening it delays every crossing.
Does SignalPeriod filter crossings by zero?
No. Every swap between the two lines earns a mark, wherever it sits on the scale. If you want only crossings below zero for buys, that is a different build rather than a setting here.
Can I change AppliedPrice usefully?
Yes, though the effect is subtle. Switching from close to typical or weighted price shifts both averages slightly, which can move a crossing by a bar. Most traders leave it on close.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the MACD 2 Line Indicator as one input. Always backtest before trading live.
Category: this is part of our Oscillators collection. Also, truly, browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- Learn more about the underlying method in Accumulation Distribution Line at StockCharts ChartSchool.
- For wider market background, see ISDAfix on Wikipedia.
