EA-1229 · Machine Learning

svmTrader

This EA uses two Support Vector Machine (SVM) models trained on standard technical indicators to generate buy and sell trade signals. When an SVM signals a trade, the EA opens a market position and places matching manual stop-loss and take-profit pending orders, using a ticket cache system to pair and manage them as separate trades.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskCaution
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsBears Power, Bulls Power, ATR, Momentum, MACD, Stochastic, Force Index
AuthorMetaQuotes Software Corp.

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

  • Can hold up to 5 positions at once

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

Strategy concept: Uses Support Vector Machine (SVM) models trained on seven technical indicators (Bears Power, Bulls Power, ATR, Momentum, MACD, Stochastic, Force Index) to independently generate buy and sell trade signals. Entry conditions: On each new bar, the classify() function feeds current indicator data to the trained SVM models; if the buy-SVM returns true, a long position is opened, and if the sell-SVM returns true, a short position is opened. Exit conditions: Manual stop-loss and take-profit are implemented via pending orders — after a buy, a SellStop (stop-loss) and SellLimit (take-profit) are placed; after a sell, a BuyStop (stop-loss) and BuyLimit (take-profit) are placed; when one is triggered, the OnTrade() handler deletes the paired order using a ticket cache. Position sizing: Fixed lot size (Vol=1), with Current_Order_Exposure() computing half of total pending order volume as risk exposure, allowing new trades only when exposure is below risk_exp (5). Money management: Relies solely on the maximum simultaneous order exposure parameter; there is no dynamic position sizing or percentage-based risk calculation.

Strengths

  • Uses machine learning (SVM) for signal generation, providing strong nonlinear pattern recognition capability
  • Buy and sell signals are produced by independent SVM models, avoiding conflicting signals from a single model
  • The ticket cache system pairs stop-loss and take-profit pending orders, enabling independent management of multiple trades
  • New bar detection prevents repeated trade entries within the same candle

Weaknesses

  • SVM is trained only once during OnInit() and never retrained, causing the model to become stale as market conditions change
  • Fixed lot size (Vol=1) lacks dynamic position sizing, unable to adjust risk based on account equity or volatility
  • Pip_Size() calculates pip value via logarithmic estimation, which is fragile and may produce incorrect results for non-standard quote currencies like JPY pairs
  • Current_Order_Exposure() estimates risk exposure as half of total pending order volume, a crude and inaccurate method
  • OnTrade() loop has a bug: it uses the order ticket as an index into the tickets[] array, which can cause out-of-bounds access when ticket values exceed array size

Possible improvements

  • Add periodic retraining mechanism (e.g., daily or weekly) so SVM models adapt to changing market conditions
  • Implement dynamic position sizing based on account equity percentage or ATR instead of fixed lot size
  • Fix the ticket cache lookup logic in OnTrade() to prevent array out-of-bounds access
  • Use SymbolInfoDouble(SYMBOL_POINT) and SYMBOL_DIGITS for correct pip size calculation instead of the fragile logarithmic method

Risk assessment

Overall risk: Caution

  • SVM model is never retrained, so signal quality degrades over time potentially leading to consecutive losses
  • Ticket cache lookup in OnTrade() has array out-of-bounds risk that may cause runtime errors
  • Pip_Size() may compute incorrectly for non-standard symbols, placing stop-loss/take-profit at wrong levels
  • No slippage or spread filter, which may result in unfavorable fills during news events or low-liquidity periods

Evaluation scores

Code quality2.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation4.0
Documentation4.0
Overall2.8

Parameters

ParameterDefaultDescription
takeProfit100Take profit level in pips
stopLoss150Stop loss level in pips
hours6Max assumed trade duration for training output (hours)
risk_exp5Maximum simultaneous position risk exposure
Tolerance_Value0.1SVM training error tolerance (default 10%)
N_DataPoints100Number of training data points to generate and use

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.