EA-36560 · Breakout

Tungman

This EA places BuyStop and SellStop pending orders at the current Ask/Bid prices on every tick, creating a breakout-style entry system. It includes a trailing stop function to manage open positions by moving the stop loss to breakeven and then trailing it. However, the TrailingStop() function is never called from OnTick(), making it completely non-functional.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryBreakout
RiskHigh risk
Blow-up riskLow
Rating★☆☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsNone
AuthorTungman

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 a breakout entry system that places BuyStop and SellStop pending orders at the current Ask and Bid prices on every tick, capturing price movement in either direction. Entry conditions require no existing pending order of the same type (checked by comment string matching), valid volume, and sufficient free margin. Exit conditions rely on fixed StopLoss and TakeProfit values set at order creation, plus a trailing stop mechanism that moves SL to breakeven once profit exceeds the trailing threshold. Position sizing is fixed at 0.01 lots with no dynamic adjustment or scaling. Money management checks free margin via OrderCalcMargin before placing orders, and validates lot size against broker minimum/maximum/step requirements. Critical flaws exist: TrailingStop() is defined but never called from OnTick(), duplicate margin checks appear on lines 60-70, loop indexing is off-by-one (i starts at Total instead of Total-1), and the second-stage SL calculations for already-trailing positions are mathematically incorrect (e.g., bid - ValidBuy subtracts a price from another price, producing nonsense).

Strengths

  • Dual pending order design captures breakout moves in both directions
  • Includes margin check and volume validation with basic risk awareness
  • Pending order expiration limited to current day, avoiding overnight risk
  • Order comment mechanism facilitates identification and management of own pending orders

Weaknesses

  • TrailingStop() function is never called from OnTick(), making the trailing feature completely non-functional
  • Attempts to place pending orders on every tick without new bar check, causing excessive invalid order requests
  • Loop indexing starts at Total instead of Total-1, causing out-of-bounds access
  • Second-stage trailing SL calculations are mathematically wrong: bid-ValidBuy and ask+ValidSell subtract/add prices to prices producing nonsensical values
  • Duplicate margin check code (lines 60-70 repeat logic from lines 56-64)
  • Fixed 0.01 lot size with no position sizing optimization

Possible improvements

  • Call TrailingStop() from OnTick() to activate the trailing stop feature
  • Add new bar check to prevent repeated order attempts on every tick
  • Fix loop index to start at Total-1 and fix second-stage SL calculation logic
  • Make lot size a configurable input parameter and consider ATR-based or risk-based dynamic position sizing
  • Add spread filter and trading session filter to avoid high-spread or low-liquidity periods

Risk assessment

Overall risk: High risk

  • No new bar check causes order attempts on every tick, potentially triggering broker rate limits or generating massive invalid requests
  • Trailing stop feature is completely non-functional, positions only protected by initial SL
  • Dual pending orders filling simultaneously creates hedged positions, doubling margin usage without additional risk control
  • SL calculation contains mathematical errors that may set incorrect stop levels during trailing phase

Evaluation scores

Code quality1.0
Strategy logic1.0
Risk management2.0
Robustness1.0
Innovation1.0
Documentation1.0
Overall1.2

Parameters

ParameterDefaultDescription
PriceTP900Take profit points (0=disabled)
PriceSL300Stop loss points (0=disabled)
trailingstoppoint200Trailing stop trigger points

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