MACD Crossover Arrows and Alert Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

Watching a pane means looking away from price. The macd crossover arrows & alert indicator solves that by putting nothing in a pane at all: the calculation runs out of sight and only the crossings appear, marked on the candles themselves and spaced by the current range.

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 Main price chart
Plots 2: BUY, SELL
Alerts popup, push notification, email, sound
Inputs 12

What shows up when you attach it

Two arrow plots, on price alone.

`BUY` prints lime at width 2.

`SELL` prints red at the same width.

Both stand `ArrowOffsetATR` `0.6` ranges clear.

No lines and no pane appear anywhere.

The calculation itself is never plotted.

  • BUY: arrow, lime, width 2, arrow code 233
  • SELL: arrow, red, width 2, arrow code 234
macd crossover arrows & alert indicator: Crossing marks on the candles themselves, EURUSD H1.
Crossing marks on the candles themselves, EURUSD H1.

What the build works out

Out of sight

iMACD runs at `FastPeriod` `12`, `SlowPeriod` `26` and `SignalPeriod` `9` on `AppliedPrice` `PRICE_CLOSE`. Both outputs feed the comparison and neither reaches a buffer.

The crossing

Two bars settle it. The main line moving from at or below its signal to above prints the buy mark, and the mirrored move prints the sell.

Spacing the marks

`ATRPeriod` `14` gives a range figure and the offset multiplies it. Where that figure is unavailable the code falls back to the bar’s own high minus low.

How to follow it

Marks appear on candles, so the pane stays free.

You cannot see how far the two lines had parted.

A crossing near zero and one far from it look identical.

Mark distance grows when the market moves harder.

Crossings report on closed bars only.

Sound ships on here, unlike most builds.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

A crossing is what speaks, and unusually for these builds `EnableSound` arrives switched on beside `EnablePopup` under `EnableAlerts`. `EnablePush` and `EnableEmail` stay shut. Each crossing reports once the bar has closed.

Every MACD Crossover Arrows & Alert Indicator input

Core settings

Setting What it does Default
FastPeriod Shorter average in the hidden calculation, `12`. 12
SlowPeriod Longer one, `26`. 26
SignalPeriod Smoothing over their difference, `9`. 9
AppliedPrice Price both averages read, `PRICE_CLOSE`. PRICE_CLOSE
ATRPeriod Window behind the spacing figure, `14`. 14

Display settings

Setting What it does Default
ArrowOffsetATR arrow distance above/below bar (xATR). Mark distance in ranges, `0.6`. 0.6

Alert settings

Setting What it does Default
EnableAlerts Governs every crossing message, `true`. on
EnablePopup Shows it as a dialog box, `true`. on
EnablePush (see inputs panel) off
EnableEmail (see inputs panel) off
EnableSound Rings it through the speakers, `true`. on
SoundFile Clip the ring uses, `”alert.wav”`. alert.wav
macd crossover arrows & alert indicator: Inputs panel, the period trio above the spacing settings.
Inputs panel, the period trio above the spacing settings.

Where the settings fit

Range-based spacing is what lets one setting suit every symbol. The reference shot is EURUSD H1, and at that pace a cross lands about once a day. Drop to M15 and the marks stack onto the candles. Move up to H4 and each one spans a session.

Where it comes unstuck

Hiding the calculation hides how strong a crossing was.

Three stacked averages lag whatever they measure.

In a range the marks alternate with nothing behind them.

Nothing spaces repeated crossings apart.

Copy the compiled MACD Crossover Arrows & Alert 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.

Download the MACD Crossover Arrows & Alert Indicator for MT4 and MT5

The zip holds the compiled MACD Crossover Arrows & Alert 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.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Do FastPeriod and SlowPeriod draw anything?

Nothing you can see. The iMACD call still runs at those periods, but neither output reaches a buffer, so the chart carries only the two arrow plots and no second window opens.

What does ArrowOffsetATR 0.6 achieve?

Spacing that travels. Six tenths of the current range figure puts a mark clear of its candle on gold and on a quiet cross alike, which a fixed point offset could never manage across symbols.

What happens if ATRPeriod returns nothing?

The code falls back to the bar’s own high minus low. That matters at the left edge of a chart, where the range figure has not filled yet and a zero offset would stack marks onto the candles.

Does the BUY arrow show how strong a cross was?

No. Because the lines never draw, a crossing far from zero looks exactly like one where the two barely separated. That is the price of keeping the pane empty and your eyes on the candles.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the MACD Crossover Arrows & Alert Indicator as one input. Always backtest before trading live.

Category: this is part of our Oscillators collection. Browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment