Use ADX as a Trend Filter in Your MT5 EA — No Code
Can I use ADX as a trend filter in my MT5 EA without coding?
Not in AlfaTactix today. ADX is not among the indicators the MT5 Strategy Builder supports, so it cannot AND-gate a Step 3 signal. Two honest paths:
- Code the gate in MQL5 — one iADX handle reads the ADX line; AND it with your existing entry condition (outline below).
- Build a no-code trend EA with supported indicators — keep an SMA or EMA cross on Step 3 and add the ATR volatility filter on Step 4 instead. ATR gates on volatility, not trend strength, so it is a different filter, not an ADX substitute.
Disclosure: Educational guide — not financial advice.
Not this article: ADX Trend EA — No Code covers the same missing indicator used as the main signal (ADX + DMI), not as a filter.
Related guides: ADX Indicator (academy) · MA Crossover EA — No Code · Build EA Without Coding · EA Strategy Library
When Your MA Cross Keeps Lying in a Range
You know the movie. EURUSD H1: fast MA crosses up — you buy. Four hours later it crosses down — you sell. Repeat until the week is red.
The crossover is not "broken." It is doing exactly what crosses do in sideways markets: fire often, mean little.
ADX is the question you would ask before the door opens: "Is there enough trend strength right now to bother?"
| ADX reading (typical) | Market feel | MA cross without filter |
|---|---|---|
| Below ~20 | Chop / sleep | Many false fires |
| 20–25 | Emerging | Mixed |
| Above 25 | Trending enough | Fewer, often cleaner |
That question is a good one — it just is not one the Strategy Builder can answer today, since ADX is not a supported indicator.
ADX as Gatekeeper, Not as Entry Signal
The idea is sound: keep an existing entry signal (an MA cross, for example) and only take the trade when ADX says the trend has strength. In MQL5 that is one extra iADX check ANDed with the entry condition.
AlfaTactix's Strategy Builder does not have ADX to wire into that AND group. The closest built-in gate is the ATR volatility filter on Step 4, which asks a different question — "is the market moving enough" — rather than "is the trend strong."
Indicator reference: ADX (academy).
Different From ADX Trend EA (DMI Signals)
| Topic | This article (filter idea) | ADX Trend EA |
|---|---|---|
| ADX job | Would be a filter (ADX > 25) | Would be the signal (DMI cross) |
| Status in AlfaTactix | Not supported — manual MQL5 or the ATR filter instead | Not supported — manual MQL5 or an MA cross instead |
| Best search intent | "ADX filter EA no code" | "ADX trend following EA" |
Both pages describe the same missing indicator used two different ways. Neither is buildable in the Strategy Builder today.
ADX Filter in MQL5
A hand-written EA adds one iADX [1] handle and ANDs the reading with your existing entry:
// OnInit
adxHandle = iADX(_Symbol, PERIOD_H1, 14);
// OnTick, once per new bar
CopyBuffer(adxHandle, 0, 1, 2, adx); // buffer 0 = ADX main line
bool trendStrongEnough = adx[1] > 25.0;
bool entrySignal = /* your MA cross or other condition */;
bool takeTrade = entrySignal && trendStrongEnough;
Read ADX on the last closed bar with CopyBuffer [2], same as any other indicator handle, so the filter does not change mid-bar.
A No-Code Alternative With Supported Indicators
The MT5 form supports the market's most-used indicators — RSI, SMA, EMA, WMA, MACD, Stochastic, Williams %R, CCI, Momentum, Bollinger Bands, ATR, Volume and OBV — plus four market filter families on Step 4: ATR volatility, market session, time range, and liquidity. The closest no-code build:
- Step 3: SMA or EMA Golden Cross / Death Cross — see MA Crossover EA — No Code.
- Step 4: ATR volatility filter, to skip trades in very quiet markets.
Honest limit: ATR measures volatility, not trend strength. It will not screen out a weak, low-ADX trend the way an ADX gate would — it only skips dead-quiet conditions. Treat it as a different filter, not an ADX substitute.
Compile and Backtest
Compile your .mq5 (hand-written, or exported from Code Generator for the supported-indicator version) with F7 → Strategy Tester Every tick [3] → Demo. Run it with and without the Step 4 ATR filter to see the effect on trade count and drawdown.
Tactix AI on this workflow
AlfaTactix includes Tactix AI: use Tactix Studio to describe your idea in plain language and draft timeframes, signals, filters, and risk into the same six-step Strategy Builder form — or open Tactix Guide on any step when you only need a field explained. Review every value, then export MQL5 or Pine Script from Code Generator (form-first — not untested prompt-to-code).
Next Steps
- EA Strategy Library — browse the no-code MT5 playbooks
- ADX Trend EA — No Code — the same missing indicator used as a signal instead of a filter
- MA Crossover EA — No Code — a trend EA you can build today
- Build EA Without Coding
References: MQL5 iADX [1] · CopyBuffer [2] · Strategy Tester [3].

