EA-46309 · Unclassified

random_trader

This EA opens a single position at a time with a random direction (buy or sell), using either a fixed pip distance or ATR-based stop loss and take profit. It includes a breakeven mechanism and risk-based lot sizing with margin validation, but the core entry logic is purely random with no market analysis.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUnclassified
RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4, D1
IndicatorsATR
AuthorSalmanSoltaniyan

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 EA's strategy concept is purely random entry trading, using MathRand() to generate 0 or 1 to decide buy or sell direction with zero technical analysis or market judgment. Entry conditions depend solely on whether there is no existing position (PositionsTotal()==0), opening a random trade whenever the account is flat. Exit conditions are implemented through stop loss and take profit, where stop loss can be based on fixed pip distance or ATR indicator, and take profit is calculated using the configured reward/risk ratio. Position sizing uses account balance percentage for risk-based lot calculation, adjusts lot size based on margin availability, and supports using maximum available margin when required margin is insufficient. The breakeven mechanism moves stop loss to the entry price after price moves favorably by a specified pip distance. Overall, this is a random trading tool rather than a strategic EA, with expected long-term returns approaching zero minus spread costs being negative.

Strengths

  • Comprehensive order validation mechanism including stop level, freeze level, and margin checks
  • Risk-based position sizing that dynamically adjusts lot size based on account balance percentage and stop loss distance
  • Breakeven mechanism effectively protects existing profits and reduces loss risk
  • Clean code structure using class encapsulation for trade validation logic, good maintainability
  • ATR-based stop loss mode can adapt to changing market volatility

Weaknesses

  • Entry logic is completely random with no market analysis basis, guaranteed long-term loss after spread costs
  • Only one position allowed at a time, missing other trading opportunities and unable to hedge
  • Pip point calculation is incomplete, not handling non-standard digits values like 0, 1, or 6
  • Stop level calculation has hardcoded 10*point extra offset, lacking transparency and configurability
  • Breakeven mechanism doesn't account for trading costs (spread and commission), moving to entry price may still result in loss
  • The tiket variable is not persisted across EA restarts, potentially losing position tracking

Possible improvements

  • Add technical analysis entry signals to replace random entry, such as MA crossover or RSI overbought/oversold, giving the strategy positive expected value
  • Move stop loss to entry price plus spread and commission costs in breakeven mechanism to ensure true breakeven
  • Complete pip_point calculation for non-standard digits and make the stop level extra offset configurable
  • Add spread filter and trading session filter to avoid trading during high spread and low liquidity periods

Risk assessment

Overall risk: Medium

  • Random entry without analytical basis, statistically guaranteed long-term loss after spread deduction (negative expected value)
  • No new bar check mechanism, may attempt to open positions on every tick potentially at unfavorable moments
  • Breakeven mechanism doesn't account for trading costs, may still be in a loss position
  • The tiket variable resets on EA restart, potentially causing loss of position management

Evaluation scores

Code quality3.0
Strategy logic1.0
Risk management4.0
Robustness3.0
Innovation1.0
Documentation2.0
Overall2.3

Parameters

ParameterDefaultDescription
reward_risk_ratio2Reward-to-risk ratio: TP distance vs SL distance
lossPIPStop-loss mode: PIP (fixed points) or ATR-based
loss_atr5ATR stop-loss multiplier applied to ATR value
loss_pip20Fixed stop-loss distance in pips
risk_percent_per_trade1Risk percentage per trade, sizes position from balance
use_breakeventrueEnable breakeven: moves SL to entry after specified distance
breakeven_distance10Breakeven activation distance in pips
use_max_margintrueUse maximum available margin to adjust lot size when insufficient

Similar Unclassified 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.