EA-1108 · Machine Learning

SelfLearningExperts

This EA uses a self-learning algorithm based on virtual trading to classify binary price patterns and estimate directional probabilities. It tracks price movement patterns across multiple delta parameters, opens virtual positions to learn which patterns predict upward or downward moves, and opens real positions only when the learned probability exceeds a configurable threshold. A forgetting factor ensures the model adapts to changing market conditions over time.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsPrice Action Pattern, Binary Pattern Encoding, Virtual Trade Probability
AuthorInteger

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 strategy concept is based on online learning of binary price patterns: the direction of recent NN bar price changes is encoded as a 0/1 binary sequence, then converted to a unique pattern number via bit arithmetic. Entry conditions: when the accumulated up-probability (PowerUp) or down-probability (PowerDn) for a given pattern from virtual trading exceeds the Probab threshold (default 0.8), and the virtual trade count for that pattern exceeds 10, a long or short position is opened respectively. Exit conditions include: stop-loss/take-profit hit (equal to the virtual trade stop parameter), probability reversal signals (close when current probability exceeds previously saved probability by 0.05), and partial close signals when profit exceeds half of dstop. Position sizing uses a fixed lot size (Lots parameter), with equal stop-loss and take-profit determined by dstop and Nstop parameters. Money management lacks dynamic position adjustment — no martingale or grid strategies — with only optional trailing stop (Trailing) and stop replacement (ReplaceStops) features.

Strengths

  • Self-learning mechanism requires no predefined indicators — automatically discovers effective price patterns through virtual trading
  • Forgetting factor (forg) enables adaptation to changing market regimes, preventing stale patterns from interfering
  • Multiple delta and stop parameter combinations provide multi-dimensional pattern recognition and risk management
  • Probability threshold and minimum trade count requirements filter out low-confidence signals
  • Supports saving and loading of learning history for persistent learning across sessions

Weaknesses

  • Fixed lot sizing lacks dynamic position management — cannot adjust based on account risk or volatility
  • Binary pattern encoding discards price magnitude information, retaining only direction — significant information loss
  • Large 3D arrays (5000x30x3) consume substantial memory and most entries may remain unused, causing inefficiency
  • Virtual trading evaluates only using Ask price, ignoring spread and slippage effects on actual trading
  • File I/O lacks error handling — missing files or read failures can cause crashes
  • TimeToUpdate function uses 2x period as cooldown, potentially missing trading opportunities during high volatility

Possible improvements

  • Introduce dynamic position sizing based on account equity and ATR volatility for more scientific money management
  • Add price magnitude features (e.g., percentage change) on top of binary patterns to improve pattern recognition information content and accuracy
  • Add error checking and exception handling for all file operations, and handle missing file scenarios in ReadProbFromFile

Risk assessment

Overall risk: Medium

  • File operations lack error handling — corrupted or missing files can cause EA malfunction
  • Discrepancy between virtual and real trading due to spread and slippage differences may cause live performance to deviate from learned results
  • Fixed lot sizing without risk adjustment may lead to excessive exposure on small accounts or during high volatility
  • StopInPointsParameter array size is 3 but Nstop can be set larger, creating potential array out-of-bounds risk

Evaluation scores

Code quality2.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation4.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
ReadHistoryfalseWhether to load saved learning history file
SaveHistoryfalseWhether to save learning history periodically and at test end
Lots0.1Fixed trading lot size
Nidelt20Number of delta parameters for different modes
Nstop1Number of SL/TP parameter sets for virtual positions
dstop250Stop loss/take profit step change in points
forg1.05Forgetting rate, slightly above 1, controls old data decay speed
Probab0.8Opening probability threshold; virtual trade probability must exceed this
NN10Pattern length (last NN bars), max 12
delta1Step value for pattern parameter delta
ReplaceStopsfalseReplace SL/TP with new signals, only move along position direction
Trailing0Trailing stop in points, 0 to disable

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.