EA-12830 · Trend Following

Exp_ADXCrossing

This EA trades based on the ADXCrossing custom indicator, which signals trend direction changes when the +DI and -DI lines cross. It opens buy positions on upward crosses and sell positions on downward crosses, with configurable money management, stop loss, and take profit settings. The EA also supports closing opposite positions on signal reversal and uses a new-bar check to avoid repeated signals within the same bar.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsADX, ADXCrossing (custom +DI/-DI crossover)
AuthorCopyright © 2015, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Run error
GBPUSD0.00%0.00%0.00%0—————Run error
USDJPY0.00%0.00%0.00%0—————Run error
XAUUSD0.00%0.00%0.00%0—————Run error

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.

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 crossover of the +DI and -DI lines within the ADX indicator to identify trend direction changes. Entry conditions are: open a buy position when UpValue (+DI crossing above -DI) signal appears, and open a sell position when DnValue (-DI crossing above +DI) signal appears, read from the specified SignalBar. Exit conditions include fixed StopLoss and TakeProfit levels, as well as reverse signal triggered closes — a buy signal closes sell positions and a sell signal closes buy positions. Position sizing supports five modes via the MMMode parameter: free margin percentage, balance percentage, loss-adjusted free margin percentage, loss-adjusted balance percentage, and fixed lot size. Money management uses the MM parameter to control risk percentage or fixed lot size, defaulting to 0.1 lots. The EA also includes an enhanced logic: when both open and close permissions are enabled but no reverse close signal is detected on the current bar, it scans forward through historical bars to find an earlier reverse signal, serving as an extended close detection mechanism.

Strengths

  • Clear strategy logic based on the classic ADX crossover signal with solid theoretical support for trend identification
  • Five money management modes providing flexibility for different trading styles and risk preferences
  • Independent control over open and close directions, allowing flexible configuration such as open-only or close-only modes
  • New bar detection mechanism prevents repeated entries within the same bar, reducing overtrading
  • Enhanced forward-scanning reverse signal detection for closes, reducing missed exit opportunities

Weaknesses

  • ADX period of 50 is relatively long, causing significant signal lag that may miss substantial early trend movement
  • StopLoss of 1000 points and TakeProfit of 2000 points are large fixed values without ATR-based dynamic adjustment, potentially unsuitable for all market conditions
  • No spread filter or trading session filter, which may result in unfavorable fills during low-liquidity or high-spread periods
  • The custom ADXCrossing indicator is not embedded, relying on an external file that can be missing during deployment, causing the EA to fail initialization
  • The historical bar scanning close logic has no upper bound limit, potentially iterating through large amounts of historical data and impacting performance in extreme cases

Possible improvements

  • Replace fixed StopLoss/TakeProfit with ATR-based dynamic calculation so risk parameters auto-adapt to different instruments and volatility environments
  • Add spread filter and trading session filter to avoid opening positions during high-spread and low-liquidity periods
  • Add a maximum lookback bar limit to the historical bar scanning close logic to prevent performance issues
  • Embed the ADXCrossing indicator logic directly into the EA to eliminate external dependency and improve deployment reliability

Risk assessment

Overall risk: Medium

  • Fixed stop loss and take profit not dynamically adjusted for market volatility, potentially causing excessive risk exposure or ineffective stops in different volatility environments
  • No spread filter means high-spread markets may cause excessive entry slippage, significantly impacting risk-reward ratio
  • External indicator dependency may cause EA initialization failure if users do not correctly deploy the indicator file

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
MM0.1Money management parameter controlling lot size or risk ratio
MMModeLOTMM mode: Free margin/Balance/Free margin minus floating/Floating-adjusted balance/Fixed lot
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage in points
BuyPosOpentrueAllow buy position opening
SellPosOpentrueAllow sell position opening
BuyPosClosetrueAllow buy signal to close sell positions
SellPosClosetrueAllow sell signal to close buy positions
InpInd_TimeframePERIOD_H1ADXCrossing indicator timeframe
ADXPeriod50ADX indicator period parameter
SignalBar1Signal bar index (0=current, 1=closed)

Similar Trend Following EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.