EA-48097 · Machine Learning

ea_template.mq5

This EA is a neural network-based trading template from the NeuroNetworksBook collection. It uses a feedforward neural network to generate trading signals based on price and indicator inputs, applying trained weights to predict market direction for automated trade execution.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsNeural Network, Moving Average, RSI, MACD
Author—

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

  • Has no stop loss or trailing stop

On its own this is not a typical blow-up pattern, 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 a feedforward neural network that takes price data and technical indicators as input layer features, processes them through hidden layer activation functions, and outputs trading signals. Entry conditions are determined by the neural network output, opening long positions when the output exceeds a set threshold and short positions when it falls below a negative threshold. Exit conditions include take-profit and stop-loss settings as well as closing positions when the neural network generates a reverse signal. Position sizing uses either fixed lot sizes or dynamic lot allocation based on account equity percentage. Money management provides a risk percentage parameter to control the maximum loss per trade but lacks equity drawdown protection mechanisms.

Strengths

  • Neural network can capture non-linear market patterns, more adaptive than traditional technical indicators
  • Template design allows users to easily modify network structure and parameters based on needs
  • Combines technical indicators with price data as input features for rich information dimensionality
  • Provides configurable risk percentage parameter with basic money management framework
  • Clear code structure separating network training from trade execution logic

Weaknesses

  • Neural network weights depend on historical training data and may fail when market structure changes, lacking online learning mechanism
  • No overfitting detection or validation mechanism, trained model may perform drastically differently in live trading vs backtesting
  • No spread filter, news filter, or trading session restrictions, will still open positions in adverse market conditions
  • Stop-loss and take-profit use fixed pip settings without dynamic adjustment based on ATR or other volatility indicators
  • Lacks position check and duplicate entry protection, may open multiple positions on the same signal

Possible improvements

  • Add online learning mechanism so the neural network can dynamically adjust weights based on real-time market data
  • Introduce spread filter and trading session controls to avoid trading during high spread and low liquidity periods
  • Use ATR for dynamic stop-loss and take-profit adjustment instead of fixed pip settings

Risk assessment

Overall risk: Medium

  • Neural network model may overfit historical data leading to poor live performance
  • No spread filter or trading session control, trades even in adverse conditions
  • Fixed pip stop-loss does not account for market volatility changes, may be too wide in low volatility and too tight in high volatility

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation4.0
Documentation2.0
Overall2.7

Parameters

ParameterDefaultDescription
LotSize0.1Fixed lot size per trade
StopLoss500Stop loss in points
TakeProfit1000Take profit in points
RiskPercent2.0Risk percentage per trade relative to balance
NN_Threshold0.6Neural network signal threshold for opening positions
HiddenLayers1Number of hidden layers
NeuronsPerLayer10Number of neurons per layer
LearningRate0.01Neural network learning rate
InputWindow20Input data window size
MagicNumber123456EA order identification number

Similar Machine Learning 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.