ADX Crossing MA Indicator: Three Conditions Per Mark

Written by Dominic Walsh · Published · Last updated

The adx crossing ma indicator takes the directional movement crossing and puts two conditions in front of it. ADX has to clear `TrendLevel`, and price has to sit on the correct side of a 50-bar average. All three land on the same closed bar or nothing prints.

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 3: MA, Buy, Sell
Alerts popup, push notification, email, sound
Inputs 10

What the Adx Crossing Ma Indicator draws on the chart

MA is the gold line, an exponential average at `MaPeriod` bars.

Buy marks a plus DI crossing above minus DI with both filters passing.

Sell marks the mirror case.

Both sit `ArrowOffsetPoints` `35` from the candle.

  • MA: line, gold, width 2
  • Buy: arrow, lime, width 4, arrow code 233
  • Sell: arrow, red, width 4, arrow code 234
ADX crossing MA indicator on EURUSD H1 with filtered direction crossings
ADX crossing MA indicator on EURUSD H1 with filtered direction crossings

How the Adx Crossing Ma Indicator calculates its values

The direction crossing

iADX supplies the plus and minus direction lines at `AdxPeriod` `14`, for the current bar and the one before. A buy needs plus at or below minus previously and above it now. That is the classic directional movement trigger.

The strength filter

The same call supplies the main line. adx_now must sit above `TrendLevel` `22`. Direction lines cross constantly while that reading is low, and this condition removes almost all of those crossings.

The price filter

iMA supplies an exponential average at `MaPeriod` `50`. A buy also needs the close above that line. Together the three conditions ask for direction, strength and position to agree.

How to read the signals

The gold line shows whether the price condition could even pass.

A crossing with nothing drawn means one of the two filters blocked it.

Marks arrive well into a move, which is the cost of three conditions.

Raise `TrendLevel` toward 30 for far fewer and stronger marks.

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

Four channels sit under `EnableAlerts`, which starts on. Only `EnablePopup` runs alongside it, while `EnablePushNotify`, `EnableEmail` and `EnableSound` begin false. `SoundFile` picks the clip. One DI message follows each closed bar.

Every Adx Crossing Ma Indicator input

Core settings

Setting What it does Default
AdxPeriod Length of the directional movement calculation, default `14`. 14
TrendLevel Minimum main line reading, default `22`. 22
MaPeriod Length of the price filter average, default `50`. 50

Display settings

Setting What it does Default
ArrowOffsetPoints Mark distance from the candle in points, default `35`. 35

Alert settings

Setting What it does Default
EnableAlerts Master switch for the DI cross alerts, default `true`. on
EnablePopup Terminal dialog on a DI cross, default `true`. on
EnablePushNotify Phone push on a DI cross, default `false`. off
EnableEmail Mail delivery on a DI cross, default `false`. off
EnableSound Sound playback on a DI cross, default `false`. off
SoundFile Wav clip for the DI alert, default `alert.wav`. alert.wav
ADX crossing MA indicator inputs: AdxPeriod, TrendLevel, MaPeriod, ArrowOffsetPoints
ADX crossing MA indicator inputs: AdxPeriod, TrendLevel, MaPeriod, ArrowOffsetPoints

Settings that fit your chart

Directional movement was built for daily charts and still reads best on slower ones. EURUSD H1 is the reference chart, where `MaPeriod` at `50` covers two days. On M5 the crossings come constantly and the strength filter does all the work. On H4 the marks turn genuinely rare.

When the Adx Crossing Ma Indicator fails

Three lagging conditions agreeing means the mark lands late in the move.

`TrendLevel` `22` is the looser end of the usual range, so it lets a fair amount through.

The price filter and the direction lines often agree by construction, so they are less independent than they look.

Copy the compiled Adx Crossing Ma 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 Adx Crossing Ma Indicator: ima (MA) at the MQL5 Documentation, Market trend on Wikipedia.

Download the Adx Crossing Ma Indicator for MT4 and MT5

The zip holds the compiled Adx Crossing Ma 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

Why does TrendLevel default to 22?

It sits at the loose end of the 20 to 30 band traders usually treat as the trend boundary. That keeps a reasonable number of marks on the chart. Raise it toward 30 if you would rather see only the strongest conditions.

What does the MA plot filter out?

Crossings on the wrong side of the trend. A buy needs the close above the 50-bar exponential average as well as the crossing. That single condition removes direction changes that happen inside a larger move against them.

How does AdxPeriod affect all three tests?

It sets the length for the plus line, the minus line and the main line at once, since all three come from the same call. Shortening it makes every part of the directional movement reading jumpier together.

Does AdxPeriod plot its direction lines?

No. Only the gold average plots here, alongside the two arrow buffers. Add a standard directional movement pane at the same `AdxPeriod` if you want to watch the crossings the logic reads.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Adx Crossing Ma Indicator as one input. Always backtest before trading live.

Category: this is part of our Trend collection. Also, still, yet, still, browse more Trend 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