ADX Multi-Currency EA: Comprehensive User Guide , Backtest Results and Optimizated Set files

19 November 2024, 11:33
Biswarup Banerjee
0
339

Complete User Documentation — MT4 & MT5

1. OVERVIEW

The Average Directional Index (ADX) Strategy Multicurrency EA is a fully automated trading robot that scans and trades multiple currency pairs simultaneously from a single chart. It uses the classic ADX indicator along with its directional components (+DI and -DI) to identify trend strength and direction, then executes entries and exits based on one of five configurable strategies. This solves the problem of manually monitoring multiple pairs for ADX setups, letting the EA handle the heavy lifting of signal generation, trade management, and risk control across your entire watchlist.

Who Should Use It: Retail forex traders who want to automate ADX-based trend-following strategies across multiple pairs without needing to code or manage separate charts for each symbol.

Main Benefit: Deploy a single EA on one chart to automatically trade up to 28 currency pairs using your preferred ADX entry and exit logic, complete with trailing stops, breakeven, and grid recovery features.


2. INPUT PARAMETERS & SETTINGS

This product shares a common set of general input settings with all Multi-Currency Scanner Dashboard products in this series. The following sections are covered in the common guide: General Settings (pairs list, dashboard colors, panel size), Timeframe Signal Settings (individual TF scan per symbol), Timeframe Confluence Settings (multi-TF confluence scan), and Alert Settings (popup, push notification, email). For full details refer to the Common Multi-Currency Scanner Dashboard Settings Guide. The sections below cover only the product-specific inputs unique to this product.

General Settings

These settings control how the EA displays virtual stop-loss and take-profit lines on the chart, how it calculates group-level risk limits, whether swap charges are included in profit calculations, and whether historical trade data is recorded for backtest analysis.

Setting Name Type Default Value Description Example
Chart lines for virtual SL/TP (never drawn during optimization) bool false When enabled, the EA draws horizontal lines on the chart showing where your hidden stop-loss and take-profit levels are placed. This is purely visual — it doesn't affect trade execution. Useful for manual verification during live trading, but leave it off during optimization to avoid clutter and speed things up. true — Enable when running on a demo or live chart to visually confirm your SL/TP placement.
Group Stoploss Amount double 0 Sets a maximum total loss in account currency for all trades opened by this EA across all symbols. Once the combined floating loss hits this threshold, the EA stops opening new positions. This is a portfolio-level risk cap, not per-trade. Leave at 0 to disable. 100 — If you have a $500 account and want to cap total drawdown from this EA at $100.
Include Swap charges in Profit bool true When true, the EA adds overnight swap (rollover) charges to the profit calculation used for breakeven and trailing stop activation. If you're a day trader who rarely holds overnight, you can set this to false to keep profit calculations clean. false — Disable if you scalp and rarely hold positions past 5 PM EST.
Enable history for backtests or optimization bool false When enabled, the EA records detailed trade history to a file during backtesting or optimization, which you can later analyze for performance metrics like win rate and profit factor. Leave it off during live trading to save resources. true — Enable only during optimization runs to export trade logs for external analysis.

Atr Trailingstop Settings

These settings configure an ATR-based trailing stop that adjusts your stop-loss dynamically based on market volatility, rather than using a fixed pip distance.

Setting Name Type Default Value Description Example
Use ATR Trailing Stop bool false Master switch for the ATR-based trailing stop feature. When enabled, the EA replaces any fixed trailing stop with a dynamic one that widens during high volatility and tightens when the market calms down. Leave disabled if you prefer a fixed pip trail or use the breakeven feature instead. true — Enable on volatile pairs like GBP/JPY to let the trail adapt to price swings.
ATR Timeframe ENUM PERIOD_CURRENT See options explained below. See options explained below.
ATR Period int 14 Number of bars used to calculate the Average True Range. A lower period like 7 makes the trail more responsive to recent volatility spikes, while a higher period like 21 smooths out noise. The default 14 is a solid starting point for most forex pairs. 21 — Use on daily charts for a smoother, less reactive trail on slower-moving pairs like EUR/CHF.
Activation (ATR multiplier) double 2.0 The profit threshold, expressed as a multiple of ATR, that must be reached before the trailing stop kicks in. For example, a value of 2.0 means the trade must be up by 2 ATRs before the trail starts. Higher values delay activation, giving the trade more room to breathe. 3.0 — Use on trending pairs like USD/JPY to let the trade run further before tightening the stop.
Trail distance (ATR multiplier) double 1.0 The initial distance of the trailing stop from the current price, measured in ATR units. A value of 1.0 places the stop 1 ATR away from price. Smaller values give a tighter stop but risk getting stopped out by normal volatility. Adjust based on the pair's average range. 1.5 — Use on EUR/USD during news events to avoid premature exits from volatility spikes.
Trail increment (ATR multiplier) double 0.5 How much the trailing stop moves up (for longs) or down (for shorts) each time price moves in your favor, measured in ATR units. A value of 0.5 means the stop tightens by half an ATR for every ATR of favorable movement. Higher values make the trail more aggressive. 0.3 — Use on choppy pairs like GBP/CHF to give the trail more room and avoid whipsaws.

ATR Timeframe — Options Explained

This setting determines which chart timeframe the EA uses to calculate the ATR value for the trailing stop. You can choose any standard timeframe from M1 to MN1, or use PERIOD_CURRENT to match the chart the EA is attached to.

PERIOD_CURRENT: Uses the timeframe of the chart where the EA is running. This is the simplest option and works well if you're trading on a single timeframe. For example, if the EA is on an H1 chart, the ATR will be calculated from H1 bars.

PERIOD_H1: Forces the ATR calculation to use hourly data regardless of the chart timeframe. This is useful if you want a consistent volatility measurement across different charts, or if you're trading on a lower timeframe but want a more stable ATR from a higher one.

PERIOD_D1: Uses daily bars for ATR calculation. This gives the smoothest, least reactive trail and is best for swing traders who hold positions for several days. The trail will only adjust once per day based on the daily range.

Grid Settings

This single setting controls whether the EA attempts to recover losses from all open grid trades by closing them as a group when total profit reaches a target.

Setting Name Type Default Value Description Example
Recover profit from all grid trades bool false When enabled, the EA calculates the total net profit across all open trades on the same symbol and closes the entire group when that profit reaches a positive value. This is designed for grid or martingale strategies where multiple positions are opened in the same direction. Leave disabled for standard single-position trading. true — Enable if you're using a grid strategy on EUR/USD and want to close all layers when the total P&L turns positive.

Safeguard Settings

These backtest-only settings let you filter optimization results by requiring minimum profit, minimum number of trades, or maximum inactivity periods — helping you discard unrealistic or overfitted parameter sets.

Setting Name Type Default Value Description Example
Max Loss from initial balance [0: disable] double 0.0 Sets a maximum drawdown limit as a percentage of the initial account balance. If the floating loss exceeds this percentage, the EA stops opening new trades across all symbols. This is a hard risk cap to prevent runaway losses during adverse market conditions. Set to 0 to disable. 20 — On a $1,000 account, the EA will stop trading if total floating loss exceeds $200.
Minimum Profit Percent [backtesting only] [0: disable] double 0 During backtesting or optimization, the EA will reject any parameter set that doesn't achieve at least this percentage of profit over the test period. This helps you filter out losing or breakeven strategies automatically. Only works when ENABLE_HISTORY_FOR_BACKTEST_OPTIMIZATION is true. 10 — Only keep optimization results that show at least 10% profit over the backtest period.
Minimum Trades [backtesting only] [0: disable] double 0 Sets a minimum number of trades that must be executed during the backtest period for the result to be considered valid.

3. HOW IT WORKS

Core Calculation & Logic

This EA scans and trades multiple currency pairs from a single chart by calculating the Average Directional Index (ADX) and its two directional components — the Positive Directional Indicator (+DI) and Negative Directional Indicator (-DI). The ADX itself measures trend strength on a scale from 0 to 100, while the DI lines show which side is in control. When ADX rises above a user-defined threshold (default 20), the market is considered trending; below that, it's ranging. The EA then applies one of five entry strategies to decide when to open a buy or sell position.

Technically, the EA uses the standard Wilder's smoothing method for ADX and DI calculations, the same formula you'd see on any MT4/MT5 chart. What sets this tool apart is that it runs this logic across all symbols you've listed in the SYMBOLS parameter — no need to attach the EA to multiple charts. Each symbol gets its own ADX reading on the chosen timeframe, and the EA checks for signals independently. This means you can monitor EURUSD, GBPUSD, and USDCHF simultaneously from one chart, with each pair's trades managed separately.

Entry Strategies Explained

The EA offers five distinct entry strategies, each triggered by different ADX/DI conditions. You pick one via the Entry Signal Strategy parameter. Here's what each does in practice:

ENTRY_STRATEGY1 — ADX Level Crossover

BUY Signal: When the ADX line crosses above the ADX Level (default 20) from below. This indicates the market is transitioning from a range into a bullish trend.

SELL Signal: When the ADX line crosses below the ADX Level from above. This suggests the trend is weakening or the market is entering a range.

Best For: Traders who want to catch the start of a trend early, but accept that some signals may be false in choppy markets.

ENTRY_STRATEGY2 — ADX Level Reverse Crossover

BUY Signal: When the ADX line crosses below the ADX Level from above. This is a contrarian signal — it assumes that after a strong trend exhausts, a reversal or range-bound move may follow.

SELL Signal: When the ADX line crosses above the ADX Level from below. This catches the beginning of a new trend after a period of low volatility.

Best For: Mean-reversion traders or those using ADX as a volatility filter rather than a trend-following tool.

ENTRY_STRATEGY3 — +DI/-DI Crossover (Default)

BUY Signal: When the +DI line crosses above the -DI line. This is a classic bullish signal — buyers are gaining control over sellers.

SELL Signal: When the -DI line crosses above the +DI line. This signals bearish momentum.

Best For: Most retail traders. This is the standard ADX entry method and works well in strong trends on higher timeframes like H1 or H4.

ENTRY_STRATEGY4 — ADX Above Level

BUY Signal: When the ADX value is greater than the ADX Level. No crossover needed — just a sustained strong trend reading.

SELL Signal: When the ADX value is less than the ADX Level. This treats low ADX as a sell signal, which is unusual — use with caution.

Best For: Traders who want to stay in trades only during strong trends and exit when momentum fades. Not recommended for beginners.

ENTRY_STRATEGY5 — +DI/-DI Level Comparison

BUY Signal: When the +DI value is greater than the -DI value. This is a continuous condition, not a crossover — the signal remains active as long as +DI stays above -DI.

SELL Signal: When the -DI value is greater than the +DI value.

Best For: Trend-following strategies where you want to hold positions as long as the directional bias remains intact, ignoring short-term noise.

Step-by-Step Workflow

Step 1: Choose Your Symbols In the SYMBOLS parameter, enter the currency pairs you want to trade, separated by commas — e.g., EURUSD,GBPUSD,USDCHF . The EA will scan and trade all of them from the chart you attach it to.

Step 2: Set ADX Parameters Configure ADX Period (default 8, but 14 is more common), ADX Level (20 for weak trends, 25 for stronger ones), and Entry Signal Strategy (start with ENTRY_STRATEGY3). These control how signals are generated.

Step 3: Define Risk Management Set your Lot Size (start with 0.01 for testing), Stop Loss and Take Profit in pips or amount, and choose your SLTP Mode (PIPS or AMOUNT is safest for beginners).

Step 4: Attach to a Chart Drag the EA onto any chart — it doesn't matter which pair, as the EA reads the SYMBOLS list. Use a 1-minute or 5-minute chart for fastest scanning, but the actual signal timeframe is set by ADX Timeframe.

Step 5: Monitor and Adjust Let the EA run on a demo account for at least 50-100 trades. Check the Journal and Experts tabs for any errors. Tweak the ADX Level or Period if you see too many false signals or missed trends.


4. RISK MANAGEMENT FEATURES

This EA includes several built-in risk controls that let you protect your account without needing external scripts. Here's what each feature does:

Feature Description
Lot Size Fixed lot size applied to every trade across all symbols. Start with 0.01 for testing. For live accounts, calculate based on 1-2% risk per trade — e.g., if your stop loss is 50 pips on a $1,000 account, that's about 0.02 lots.
Stop Loss & Take Profit Modes Choose from six modes: PIPS (fixed distance), AMOUNT (fixed cash value), PERCENT (account percentage), GROUP_AMOUNT and GROUP_PERCENT (aggregate across all open positions), or NOSLTP (no stops — not recommended). The AMOUNT mode is safest for beginners because it adjusts stop distance automatically based on contract size.
Hidden SL/TP When enabled, the EA places stop loss and take profit orders that are not visible to the broker or other market participants. This prevents stop hunting. The Chart lines for virtual SL/TP option lets you see them on screen for manual monitoring — but it's disabled during optimization to avoid errors.
Group Stop Loss / Take Profit These settings (GROUP_AMOUNT and GROUP_PERCENT) close all open positions if the total loss or profit across all symbols reaches a specified threshold. For example, set GROUP_STOPLOSS_AMOUNT to 50 to close everything if the combined loss hits $50. This is useful for limiting drawdown during correlated market moves.
Risk-Reward Ratio If you set a stop loss but leave take profit at 0, the EA can calculate a take profit based on a fixed risk-reward ratio. For instance, a ratio of 2 means the take profit is twice the stop distance. This automates position sizing for consistent R:R across trades.

5. IMPORTANT NOTES & WARNINGS

Known Limitations

Issue Explanation
Single Chart Dependency The EA must be attached to a single chart. If you close that chart, all trades and monitoring stop. Always run it on a separate MT4/MT5 instance if you need to keep it running 24/7.
No Partial Close The EA does not support partial position closing. Each trade is opened and closed as a whole. If you need to scale out, you'll need to manually intervene or use a separate EA.
No Trailing Stop There is no built-in trailing stop. If you want to lock profits as a trend progresses, you'll need to add a trailing stop EA or manually adjust stops. This is a common request for ADX strategies.
ADX Lag on Low Timeframes ADX is a lagging indicator. On M1 or M5 charts, signals may come late, leading to poor entries. For best results, use H1 or higher for the ADX Timeframe setting, even if you attach the EA to a lower timeframe chart.
No News Filter The EA does not pause trading around high-impact news events. During news spikes, ADX can jump artificially, causing false signals. Consider using a separate calendar-based filter or manually disabling the EA before major releases.

Settings Beginners Should NOT Change

Setting Why to Leave Default
Hidden SL/TP Disabling this exposes your stop levels to the broker, increasing the risk of stop hunting. Keep it enabled unless you fully understand the implications.
SLTP Mode — NOSLTP Trading without any stop loss is extremely risky, especially on a multicurrency EA where multiple positions can amplify losses. Only use this if you have a separate risk management system in place.
Group Stop Loss / Take Profit Values Setting these too low (e.g., $5) can cause premature mass closures during normal market noise. Leave them at 0 until you've backtested appropriate thresholds for your strategy.
Entry Signal Strategy ENTRY_STRATEGY3 (+DI/-DI crossover) is the most intuitive and widely tested. Switching to other strategies without understanding their logic can lead to unexpected behavior. Test each on demo first.
ADX Period Below 8 A period below 8 makes ADX extremely sensitive, generating many false signals. The default 8 is already quite fast; 14 is more reliable for most traders. Don't go below 5.

Dashboard Usage Tips

  1. Start with a demo account: Run the EA for at least 100 trades on a demo before going live. This helps you understand how each entry strategy behaves in different market conditions.
  2. Use a VPS for 24/7 operation: If you plan to run the EA continuously, install it on a virtual private server (VPS) near your broker's server. This prevents disconnections and ensures trades are executed on time.
  3. Monitor correlated pairs: If you trade EURUSD, GBPUSD, and USDCHF together, remember they are correlated. A strong USD move can trigger simultaneous signals on all three, increasing your risk. Consider limiting the number of pairs or using group stop loss.
  4. Adjust ADX Level based on volatility: In calm markets, use 20-25. In volatile markets (e.g., during news), raise it to 30-35 to avoid false signals. You can change this parameter without restarting the EA.
  5. Check the Experts tab for errors: If the EA isn't trading, open the Experts tab in the terminal. Common issues include "invalid symbol" (typo in SYMBOLS list) or "not enough money" (lot size too large for account balance).
  6. Don't mix entry strategies mid-test: Stick with one strategy for at least 50 trades before switching. Mixing strategies makes it impossible to know which one is working or failing.

Quick Start Guide

Follow these steps to get started in under 5 minutes:

  1. Download and install: After purchase, download the EA file (.ex4 or .ex5) and place it in your MT4/MT5 Experts folder. Restart the platform or refresh the Navigator panel.
  2. Set your symbols: In the EA's input parameters, find SYMBOLS and enter the pairs you want to trade — e.g., EURUSD,GBPUSD . Use the exact Market Watch names.
  3. Choose a strategy: Leave Entry Signal Strategy at its default (ENTRY_STRATEGY3) for now. This is the +DI/-DI crossover — the most beginner-friendly option.
  4. Set risk limits: Change Lot Size to 0.01. Set SLTP Mode to PIPS, then enter <

    Installation Guide for MQL Products | Updating Purchased MQL Products on MT4/MT5 | General Troubleshooting Guide | Backtest and Set Files

    Check all my products: https://www.mql5.com/en/users/biswait50/seller

    Contact me for support: https://www.mql5.com/en/users/biswait50