EA-1295 · Trend Following

Exp_AML

This EA trades based on the ColorAML custom indicator, opening buy positions when the indicator signals an uptrend (value=2) and sell positions when it signals a downtrend (value=0). It uses configurable lot sizing, stop loss, and take profit levels, with permission switches for each trade direction and position closing. The strategy operates on a multi-timeframe basis, running the indicator on a user-specified timeframe while executing on the chart timeframe.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsColorAML (custom)
AuthorCopyright © 2012, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

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 core strategy of this EA is a trend-following system based on the ColorAML custom indicator. Entry conditions are: a buy position opens when indicator buffer 1 at the signal bar equals 2 and the previous bar's value is not 2, ensuring entries only occur on trend transitions rather than during ongoing trends. Sell positions open when the value is 0 and the previous bar is not 0, applying the same transition logic. Exit conditions include fixed stop loss and take profit in points, as well as closing positions on reverse signals (e.g., closing longs when a downtrend signal appears). Position sizing is controlled via the MM parameter, where negative values represent fixed lot sizes and positive values represent deposit-proportional sizing. Money management is delegated to external functions in the TradeAlgorithms.mqh include file, with no built-in money management logic visible in the EA itself. The strategy detects signals only on new bar formations to avoid per-tick redundant calculations, and uses the IsNewBar mechanism to prevent duplicate position openings.

Strengths

  • Clear trend-transition entry logic that avoids duplicate entries during ongoing trends
  • Flexible position sizing parameter supporting both fixed lots and deposit-proportional modes
  • Separate permission switches for opening and closing positions in each direction enable fine-grained control
  • New bar detection mechanism prevents per-tick redundant calculations and signal flickering
  • Explicit stop loss and take profit parameters provide a basic risk control framework

Weaknesses

  • Core trading logic depends on external include file TradeAlgorithms.mqh, making it impossible to independently evaluate trade execution quality
  • No spread filter mechanism; while less impactful on H4, switching to shorter timeframes could lead to slippage losses
  • ColorAML is a custom indicator not included in standard MT5 installations; missing indicator causes EA failure with only a log print as error handling
  • No position check logic; may open duplicate positions in the same direction if one already exists
  • Stop loss and take profit are fixed point values without ATR-based dynamic adjustment for market volatility

Possible improvements

  • Add position check logic to avoid duplicate entries in the same direction, or check current positions before opening new ones
  • Convert stop loss and take profit to ATR-based dynamic calculation to adapt to different market volatility environments
  • Add robust error handling when custom indicator handle acquisition fails (e.g., stop EA execution or implement retry mechanism)
  • Add spread filter and trading session filter to improve execution quality

Risk assessment

Overall risk: Medium

  • Dependency on external include file TradeAlgorithms.mqh whose trade execution logic is unaudited and may contain unknown position management flaws
  • No position direction or count check may lead to duplicate same-direction entries causing overexposure
  • EA continues running when indicator handle acquisition fails but cannot generate signals, potentially missing trading opportunities or behaving unexpectedly

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall2.2

Parameters

ParameterDefaultDescription
MM-0.1Trade share or lot; negative value=fixed lots
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Max price deviation in points (slippage tolerance)
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H4Timeframe for indicator calculation
Fractal6AML indicator fractal parameter
Lag7AML indicator lag parameter
SignalBar1Bar index for entry signal

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.