Perceptron
A perceptron-based neural network EA that uses 5 technical indicators (MA crossover, RSI, CCI, MA slope, Awesome Oscillator) as inputs to 5 sub-neural-networks, which are then combined by a meta-network to produce buy/sell signals. The synaptic weights are adjusted online using a simple reward/punishment mechanism based on whether the last trade was profitable or not.
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
This EA employs a multi-layer perceptron architecture consisting of 5 sub-neural-networks and one meta-network. Each sub-network takes 4 out of 5 indicator signals as input using a leave-one-out scheme, producing intermediate outputs via weighted summation, and the meta-network combines all 5 sub-network outputs into a final decision value. Entry conditions: buy when meta-network output is positive, sell when negative, with the additional constraint that no position is open and the trade direction differs from the last trade. Exit relies on fixed stop loss (default 100 points) and take profit (default 40 points). Position sizing is fixed at 0.1 lots with no dynamic adjustment based on account equity or risk. The synaptic weight adjustment uses a simple reward/punishment mechanism: profitable trades strengthen weights in the correct direction while losing trades reverse-adjust, with weights clamped between SinMin and SinMax bounds.
Strengths
- Online learning capability with weights dynamically adjusted based on trade results, providing adaptability
- Multi-indicator fusion decision making with 5 indicators providing signals from different dimensions, reducing single-indicator bias
- Leave-one-out network architecture where each sub-network omits one indicator, increasing model robustness
- Weight bounds (SinMin/SinMax) prevent unbounded weight growth and overfitting
- Discrete indicator signals (-1/0/1) reduce noise interference from raw indicator values
Weaknesses
- The perceptron only performs linear weighted summation without activation functions or nonlinear transformations, severely limiting representational capacity
- SinapticsAjust() is never called anywhere in the code, making the entire weight adjustment logic dead code — the network cannot actually learn
- Critical bugs in NN4 weight adjustment: incorrectly modifies NN3 weights (NNS3IND2 instead of NNS4IND2), and NNS2IND4 is mistakenly modified in NN3 sections at multiple locations
- Fixed 0.1 lot position sizing with no money management strategy, unsuitable for varying account sizes
- No new bar detection, causing recalculation and potential order attempts on every tick
- Stop loss exceeds take profit (100:40), giving a risk-reward ratio of only 0.4, requiring extremely high win rate to be profitable
Possible improvements
- Fix dead code: call SinapticsAjust() in OnTick after trade closure to activate the weight adjustment logic
- Fix weight bugs: NN4 should modify NNS4IND2 not NNS3IND2, NN3 should modify NNS3IND4 not NNS2IND4
- Add activation functions (e.g., tanh or sigmoid) to give the network nonlinear representational capacity
- Add new bar detection to avoid recalculating every tick, add position checks and minimum trade interval
- Implement dynamic position sizing based on account balance or risk percentage
Risk assessment
Overall risk: High risk
- Core learning function SinapticsAjust() is never called, weights remain at initial value 1, the EA has no actual learning capability
- Multiple copy-paste bugs in weight adjustment incorrectly modify other neural networks' weights
- No new bar detection, trade logic runs on every tick
- No spread filter, may open positions during high-spread conditions
- Fixed lot size with no money management, risk-reward ratio of 0.4 requires very high win rate
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
SL | 100 | Stop loss in points |
TP | 40 | Take profit in points |
SinMax | 5 | Synaptic weight upper limit |
SinMin | 0 | Synaptic weight lower limit |
MAGIC | 999 | Order magic number |
SinPlus | 0.03 | Synaptic weight positive adjustment step |
SinMinus | 0.03 | Synaptic weight negative adjustment step |
ma1 | 5 | Fast MA period |
ma2 | 9 | Slow MA period |
RSI | 14 | RSI indicator period |
CCI | 14 | CCI indicator period |
ma_a | 5 | IND4 MA period |
IAO | 20 | Awesome oscillator bars to read |
Similar Machine Learning EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.