Free Forex indicator · MT4 / MT5

MACD Alert for MT4 & MT5: Settings and Free Source Download

Compare MACD zero crossings with main/signal crossings on real EUR/USD charts. Learn the actual inputs and alert behaviour, then download the marked FBR source edition for MT4 or MT5.

Reviewed by ForexBestRobots Editorial Team

Original sourceEarnForex 1.02 · FBR edition 1.03
PlatformsDesktop MT4 · MT5
LicenseApache 2.0 · Free
On this page

What this MACD indicator adds

MACD compares a fast and slow exponential moving average. This program displays the main output and a red signal line in a separate window, with optional arrows on price and alerts for selected events. It helps distinguish a change in relative momentum from a crossing of the zero line.

The download is MACD with Alert FBR edition 1.03, a marked Apache-licensed derivative of EarnForex 1.02. FBR documents buffer alignment, history checks, arrow placement and instance-only cleanup. Source is supplied for compilation; the indicator does not place trades or manage stops.

12/26/9, SMA signal and two crossing families

At the defaults, Main=EMA(Close,12)−EMA(Close,26), and Signal=SMA(Main,9). The signal average is simple, unlike EMA-based signal versions elsewhere. MACDType changes Main between bars and a line; its histogram shows Main, not Main−Signal. The latter difference is often called OsMA.

MACD_MAIN_SIGNAL_CROSS, the default, labels a strict change from Main below Signal to Main above Signal BUY(CROSS); the reverse is SELL(CROSS). MACD_MAIN_SWITCH_SIDE labels Main below zero then above zero BUY(SWITCH), and above then below SELL(SWITCH). Both compared readings must lie strictly on opposite sides; equality does not qualify.

MACD_MAIN_ALL checks both families, but returns the zero-cross event first if both qualify on the same evaluated candle. One event and arrow are selected there. Crosses can occur below or above zero; BUY/SELL are event names, not executed trades or guaranteed reversal instructions.

24 functional inputs and FBR defaults

Both platform sources have these 24 controls and four decorative Comment headings. Use positive periods with fast no greater than slow, a nonnegative scan and arrow sizes 1–5. Each instance on the same chart needs a different nonempty IndicatorName.

InputDefaultPractical meaning
IndicatorNameFBR-MACDWAInstance name and arrow prefix; choose a unique name per chart instance.
MACDFastEMA12Fast EMA period, default 12.
MACDSlowEMA26Slow EMA period, default 26; at least the fast period.
MACDSMA9Simple average period for Signal, default 9; not an EMA selector.
MACDAppliedPricePRICE_CLOSEApplied price; Close by default, with other native price types available.
AlertSignalMACD_MAIN_SIGNAL_CROSSSelects main/signal crossings, zero crossings, or both with zero-event priority.
CandleToCheckCURRENT_CANDLECurrent evaluates the forming candle; Previous evaluates a completed candle. FBR marks that evaluated candle.
MACDTypeMACD_TYPE_HISTOGRAMDraws Main as a histogram or a line; calculations and comparisons remain the same.
BarsToScan500History scan, default 500. In FBR, 0 uses available history and increases work.
EnableNotifyfalseMaster notification switch. False disables all delivery channels.
SendAlerttruePopup is true, but inactive while EnableNotify=false.
SendAppfalseMobile push, initially false; terminal configuration required.
SendEmailfalseEmail, initially false; terminal configuration required.
EnableDrawArrowstrueThreshold-event arrows, enabled by default.
ArrowBuySwitch241Wingdings code for upward zero-cross arrows.
ArrowSellSwitch242Wingdings code for downward zero-cross arrows.
ArrowSizeSwitch3Zero-cross arrow size, 1–5.
ArrowColorBuySwitchclrGreenColour of BUY(SWITCH) arrows.
ArrowColorSellSwitchclrRedColour of SELL(SWITCH) arrows.
ArrowBuyCross233Wingdings code for upward main/signal arrows.
ArrowSellCross234Wingdings code for downward main/signal arrows.
ArrowSizeCross3Main/signal arrow size, 1–5.
ArrowColorBuyCrossclrGreenColour of BUY(CROSS) arrows.
ArrowColorSellCrossclrRedColour of SELL(CROSS) arrows.

Real EUR/USD: signal crosses, zero crosses and faster settings

These original charts use archived Yahoo Finance EURUSD=X H1 OHLC in UTC. FBR reconstructed first-price-seeded EMAs and an SMA signal using the full available archive. The displayed windows follow a long warm-up; they are calculated illustrations, not native MetaTrader screenshots or a tick replay.

EUR/USD with default 12/26/9 MACD. Grey bars show Main and the red line is SMA(Main,9). Letters mark selected strict main/signal crosses, including events that need not cross zero.
EUR/USD with default 12/26/9 MACD. Grey bars show Main and the red line is SMA(Main,9). Letters mark selected strict main/signal crosses, including events that need not cross zero.2025-06-09 00:00 — 2025-06-11 23:00 UTC · 72 candles
Another fixed window highlights strict zero crossings of Main with the same 12/26/9 inputs. Letters are FBR analytical annotations, not native arrow captures or executed orders.
Another fixed window highlights strict zero crossings of Main with the same 12/26/9 inputs. Letters are FBR analytical annotations, not native arrow captures or executed orders.2025-06-16 00:00 — 2025-06-19 23:00 UTC · 96 candles
Identical candles with 12/26/9 and 5/13/5 on Close. Faster inputs change timing, amplitude and event frequency; this comparison does not prove higher profitability.
Identical candles with 12/26/9 and 5/13/5 on Close. Faster inputs change timing, amplitude and event frequency; this comparison does not prove higher profitability.2025-06-16 00:00 — 2025-06-19 23:00 UTC · 96 candles

The provider does not identify these as broker-specific Bid/Ask execution prices. Native history and initialization can differ. Spreads, fills and returns were not measured. Scroll charts horizontally on narrow screens.

Download the illustrated readings (CSV) · 1Download the illustrated readings (CSV) · 2

Alerts, candle choice and repeat suppression

EnableNotify=false is the master default even though SendAlert=true. Enable both for popups; push and email also need their terminal settings. Current is the default and can generate a temporary event or an arrow that disappears before close. Previous uses the completed candle; FBR attaches the arrow to that evaluated candle.

The retained direction state suppresses a repeated identical event until the state changes or becomes neutral. Previous notifications are also gated by new chart-bar time. There is no separate sound-file setting or seconds-based cooldown input in this program, and it does not promise one message for every historical arrow.

The retained email and push format includes broker company, account name and account number. These channels start disabled; downloading activates none. Native notification delivery and chart-object behaviour have not been tested by FBR.

Compile and install the FBR source edition

Choose MQ4 for desktop MT4 or MQ5 for MT5. These derivative ZIPs contain no ready EX4/EX5; compile the correct source in the matching MetaEditor.

  1. Download and extract the ZIP for your platform.
  2. In MetaTrader choose File → Open Data Folder, then MQL4 or MQL5.
  3. Copy Indicators and Files there; MT5 also needs Include. The separate upstream copy is reference material.
  4. Open MACD_Alert_FBR.mq4 or MACD_Alert_FBR.mq5 in matching MetaEditor, choose Compile (F7), and inspect compiler errors.
  5. Refresh Navigator → Indicators, attach MACD_Alert_FBR to a demo chart, choose a unique IndicatorName and check inputs, history and Experts/Journal.

FBR has not compiled or run these files in MetaTrader. Formula, event and index-model checks do not replace native runtime testing. Verify the compiled indicator on a demo chart first.

Download MACD with Alert FBR free

Each ZIP includes modified platform source, untouched original reference source, required author icon and MT5 includes, full Apache 2.0 license, change log, patch, instructions and SHA-256 checksums. No registration or broker account is needed to download.

FBR 1.03 identifies this derivative of EarnForex 1.02. Original attribution is retained and changes are marked. The modified program is supplied as source for platform-specific compilation.

Free source ZIP · FBR 1.03 · Compile in MetaEditor

Forming values, initialization and review limits

Current-candle Main, Signal and arrows can change before close. History corrections, feed differences and the starting point can alter past values too. The numerical reconstruction does not certify native iMACD initialization, all terminal builds or notification delivery.

FBR sets series order after binding, bounds both buffers and neighbouring comparisons, checks MT5 copies and releases its handle. Arrows use the evaluated candle and cleanup uses only the instance arrow prefix. BarsToScan=0 can increase workload. Different same-chart instances require distinct names.

MACD is unbounded and measured in price units: its amplitude is not directly comparable across different symbols. Crossings can repeat in ranges and arrive after a substantial move. Our checks do not execute MQL, test intrabar paths or establish entry, exit, position size or profitability.

Frequently asked questions

Is the histogram Main minus Signal?

No. In this program the bars display Main=fast EMA−slow EMA. Signal is a separate SMA line; Main−Signal is a different derived quantity.

Does the signal line use EMA9?

No. Default MACDSMA=9 refers to a simple moving average of Main. Other MACD implementations can differ.

Can ALL produce two arrows on one candle?

The code gives a qualifying zero cross priority over a simultaneous main/signal cross, selecting one event and arrow for that evaluation.

Why can an arrow disappear or no popup appear?

Current can change before close, and EnableNotify=false globally disables delivery. State and candle rules also affect repeats.

Are compiled platform files included?

No. Compile MQ4/MQ5 in matching MetaEditor. This is a marked FBR 1.03 derivative; native compilation/runtime has not been performed by FBR.

Sources and verification scope

Original source and license were matched to a pinned EarnForex revision. FBR modifications are marked. Independent EMA/SMA and event-model checks support the illustrations, without replacing a native terminal or strategy test.