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
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | -0.1 | Trade share or lot; negative value=fixed lots |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Max price deviation in points (slippage tolerance) |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H4 | Timeframe for indicator calculation |
Fractal | 6 | AML indicator fractal parameter |
Lag | 7 | AML indicator lag parameter |
SignalBar | 1 | Bar index for entry signal |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.