Auto ADX
This EA uses the ADX (Average Directional Index) indicator to identify trend strength and direction, automatically opening buy or sell positions when the ADX signals a strong trending market. It combines DI+ and DI- crossovers with ADX threshold filters to enter trades in the direction of the prevailing trend. The system manages positions with configurable stop loss and take profit levels.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | +0.11% | +0.09% | 5.93% | 74 | 35.60% | 0.05 | 0.02 | 5 | −$0.31 | Reliable |
| GBPUSD | -8.30% | -7.25% | 10.42% | 84 | 32.50% | -1.44 | -0.80 | 10 | −$10.28 | Reliable |
| USDJPY | -1.07% | -0.93% | 4.81% | 90 | 36.00% | -0.16 | -0.22 | 8 | −$1.03 | Reliable |
| XAUUSD | -9.57% | -7.98% | 74.33% | 123 | 53.30% | 0.33 | -0.13 | 5 | −$9.86 | Reliable |
Profitable on 1 of 4 markets with reliable results.
Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.
Against the other Trend Following EAs with a reliable result on the same market: EURUSD: better than 58% of 95 · GBPUSD: better than 6% of 95 · USDJPY: better than 46% of 95 · XAUUSD: better than 40% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 54% | +1.66% 2026-10 | -1.45% 2026-07 |
| GBPUSD | 31% | +2.10% 2026-07 | -4.12% 2026-04 |
| USDJPY | 46% | +2.37% 2026-02 | -1.25% 2025-12 |
| XAUUSD | 77% | +52.54% 2026-08 | -53.61% 2026-02 |
From the backtest equity curve, sampled about every two days; only reliable results.
Blow-up risk: No blow-up pattern found
None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.
High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →
Strategy analysis
The strategy concept is based on the ADX indicator to assess trend strength and direction, entering trades only when ADX exceeds a configured threshold indicating a trending market. Entry conditions require DI+ crossing above DI- for buy signals and DI- crossing above DI+ for sell signals, both filtered by the ADX threshold to avoid choppy sideways markets. Exit conditions include reaching the take profit target, hitting the stop loss level, or closing on an opposite DI crossover signal. Position sizing typically uses fixed lot sizes or an ATR-based dynamic calculation, though some implementations include basic money management options. The risk management relies primarily on fixed stop loss and take profit values, lacking advanced features like trailing stops, partial position closure, or equity-based position scaling which limits its adaptability in volatile market conditions.
Strengths
- ADX filter effectively avoids choppy markets, preventing frequent losing trades in sideways conditions
- DI+/DI- crossover combined with ADX threshold provides clear and unambiguous signals easy to understand and optimize
- Highly configurable parameters allow traders to adjust ADX threshold and stop levels for different instruments and timeframes
Weaknesses
- ADX is a lagging indicator causing delayed entries that may miss the early stage of trends
- Lack of trailing stop means floating profits in strong trends cannot be locked in, potentially turning winners into losers
- Fixed stop loss and take profit do not adapt to varying market volatility, leading to inconsistent risk-reward ratios across different volatility regimes
Possible improvements
- Add ATR-based dynamic stop loss and take profit to automatically adjust distances based on market volatility for better adaptability
- Implement a trailing stop feature to progressively lock in profits as the trend extends, avoiding significant drawdowns
Risk assessment
Overall risk: Medium
- Default stop loss value is 0, meaning trades have no stop protection if not manually configured, posing extreme risk
- Lacks position count check and duplicate entry prevention, potentially opening multiple positions on the same signal
- No spread filter allows entries during high-spread periods which significantly degrades risk-reward ratio
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
ADX_Period | 14 | ADX indicator calculation period |
ADX_Threshold | 25 | ADX trend strength threshold, only open positions above this value |
DI_Period | 14 | DI+/DI-direction indicator period |
StopLoss | 0 | Stop loss in points, 0 means no stop loss |
TakeProfit | 0 | Take profit in points, 0 means no take profit |
LotSize | 0.1 | Fixed trading lot size |
MagicNumber | 12345 | EA magic number for identifying this EA's orders |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.