EA-52148 · Machine Learning

Neurotest

A simple feedforward neural network EA for MetaTrader 5 that uses a single hidden layer with ReLU activation to predict price direction from OHLCV data. It trains online during backtesting via momentum-based gradient descent, and opens buy/sell trades when the sigmoid output exceeds 0.6 or falls below 0.4 respectively. Risk management includes ATR-based dynamic stop loss, daily and total drawdown limits, and spread filtering.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskHigh risk
Rating★☆☆☆☆
TypeTrading EA
TimeframesM15
IndicatorsATR
AuthorSeyyid Sahin

Backtest results (H1, about 1 year)

Not backtested yet — this EA could not be converted automatically.

Strategy analysis

The EA's strategy concept employs a simple 3-layer feedforward neural network (5 inputs, configurable hidden layer, 1 output) to learn price movement patterns from historical OHLCV candle data. Entry conditions are: buy when the sigmoid output exceeds 0.6, sell when it falls below 0.4, and no trade when between 0.4-0.6. Exit conditions rely on ATR-based dynamic stop loss and a 2:1 risk-reward take profit ratio, with no trailing stop or signal-based position closing logic. Position sizing is calculated from account equity and maximum risk percentage per trade, normalized to broker lot constraints including minimum/maximum lot and lot step. Money management enforces hard daily loss limit of 5% and total loss limit of 10%, with a penalty mechanism that reduces the learning rate when daily profit falls below the 1% target. However, the normalization logic has a critical flaw—computing min-max from a single sample forces all inputs to zero, and there is no check for existing positions in the same direction, which can lead to repeated trade entries on every tick.

Strengths

  • Implements neural network-based adaptive trading signal generation, conceptually innovative
  • Has a complete money management framework with daily/total drawdown limits and dynamic stop loss
  • Uses ATR-based dynamic stop loss to adapt to market volatility with a reasonable 1:2 risk-reward ratio
  • Model parameters can be persisted, allowing the EA to reuse trained weights after restart
  • Includes spread filter to avoid entering trades in high-spread environments

Weaknesses

  • Normalization logic is critically broken—computing min-max from a single sample normalizes all inputs to zero, making the network unable to learn effectively
  • No existing position check, potentially opening repeated trades every tick, leading to uncontrolled position accumulation
  • No new bar check means trading logic triggers every tick, causing redundant computation and potential duplicate orders
  • Network architecture is overly simplistic (5 raw price inputs + single hidden layer with 5 neurons), insufficient to capture meaningful market patterns
  • ATR indicator handle is created in GetDynamicStopLoss on every call without being released, causing resource leaks
  • Training uses raw price levels instead of differenced data or returns, lacking stationarity which hinders network generalization

Possible improvements

  • Fix normalization logic—use dataset-wide statistics (mean/std or global min-max) computed before training, and use differenced data or log returns instead of raw prices
  • Add position existence check and new bar check to prevent repeated entries and unnecessary per-tick computation; move ATR handle creation to OnInit and release in OnDeinit
  • Add validation set and early stopping to prevent overfitting; consider implementing a more robust optimizer (e.g., Adam) and more thoughtful network architecture design

Risk assessment

Overall risk: High risk

  • No position check allows repeated trade entries every tick, leading to uncontrolled position accumulation
  • Broken normalization logic makes neural network output meaningless, rendering trading decisions essentially random
  • ATR handle resource leak may exhaust indicator handles during extended operation
  • Training on raw prices instead of stationary series may cause the network to overfit to specific price levels

Evaluation scores

Code quality2.0
Strategy logic1.0
Risk management3.0
Robustness1.0
Innovation3.0
Documentation2.0
Overall2.0

Parameters

ParameterDefaultDescription
MaxRiskPerTrade1.0Maximum risk percentage per trade
DailyLossLimit5.0Maximum daily loss percentage
TotalLossLimit10.0Maximum total loss percentage
MagicNumber12345EA identifier to distinguish orders
EnableLoggingtrueEnable verbose logging
InitialLearningRate0.01Neural network initial learning rate
HiddenLayerSize5Hidden layer neuron count
MaxEpochs1Max training epochs per tick
ModelFileNameneural_network.datModel save/load filename
ATRPeriod14ATR period for dynamic stop loss
MaxSpread20.0Maximum allowed spread in points

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.