EA-31198 · Breakout

RangeBreakout2

A periodic range breakout EA that sets up price boundaries (High/Low) based on ATR, percentage, or fixed range at scheduled times (weekly or daily), then opens breakout trades when price crosses those boundaries. It supports multiple trade modes (stop/limit/random), lot management strategies (constant/linear/martingale/fibonacci), and configurable take-profit/stop-loss percentages. The EA cycles through StandBy, Setup, Trade, and Deal phases, resetting after each completed deal.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryBreakout
RiskHigh risk
Blow-up riskHigh
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsATR
AuthorMokara

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: High

  • Increases the position size after losses (martingale)
  • Has no stop loss or trailing stop

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 to establish a price range at scheduled times (weekly on a specified day or daily at a specified hour), then enter trades when price breaks out of the range boundaries. Entry conditions: when Ask breaks above the upper boundary, direction depends on trade mode — Stop mode goes long, Limit mode goes short; conversely when Bid breaks below the lower boundary. Exit conditions rely on configurable take-profit and stop-loss percentages, both calculated as proportions of the range. Position sizing supports four modes: constant lot size, linear increment (lot increases linearly after losses), martingale (lot doubles after losses with configurable multiplier), and Fibonacci (lot follows Fibonacci sequence after consecutive losses). Money management controls base lot size via a margin percentage and uses OrderCalcMargin to verify sufficient funds before opening positions. Range can be calculated via ATR indicator, price percentage, or fixed points, with a range multiplier to widen the range after losses.

Strengths

  • Multiple range calculation modes (ATR/Percent/Fixed) adapt to different market volatility environments
  • Clean four-phase state machine design (StandBy/Setup/Trade/Deal) with clear logic flow
  • Supports multiple lot management strategies, allowing users to choose based on risk preference
  • Well-organized input parameters with range validation to prevent misconfiguration
  • Visual aids (horizontal/vertical lines) help users understand the current range setup

Weaknesses

  • Default martingale lot management exponentially increases position size after consecutive losses, creating account blowup risk
  • Trade phase is empty — no handling of open positions mid-trade (e.g., trailing stop, partial close)
  • Random trade mode lacks strategic purpose, and the switch statement is missing break clauses causing fall-through
  • No check for existing open positions, potentially allowing duplicate entries and uncontrolled risk exposure
  • Hour conversion logic in SetupCondition has potential issues — forcing hour=0 when >=23 may skip the correct time window

Possible improvements

  • Add position check logic to prevent duplicate entries when an existing position in the same direction is already open
  • Fix the missing break clauses in CheckRandom() switch statement, and consider removing Random mode or giving it meaningful strategy logic
  • Implement trailing stop or breakeven logic in the Trade phase to improve risk management for open positions

Risk assessment

Overall risk: High risk

  • Martingale lot management causes exponential position growth on consecutive losses, potentially blowing up the account
  • No position check mechanism may allow duplicate entries within the same range, causing uncontrolled risk exposure
  • Missing break in CheckRandom() switch causes fall-through, potentially producing unexpected trade direction

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management2.0
Robustness2.0
Innovation3.0
Documentation1.0
Overall2.2

Parameters

ParameterDefaultDescription
PeriodicityWeeklyPeriodicity mode: weekly, daily, or continuous
DayMondayTrading day for weekly mode
HourH0Setting time for daily/weekly mode
RangeModeATRRange calculation mode: ATR, percentage, or fixed
perATR50ATR percentage (10-500 in ATR mode)
perPrice1Price percentage (0.1-10 in percentage mode)
rangeFixed1000Fixed range in points (10-5000 in fixed mode)
TradeModeStopTrade mode: stop breakout, limit reversal, or random
perRange100Range percentage (10-100), defines band distance from center
perProfit100Take-profit percentage (10-100), based on range width
perLoss100Stop-loss percentage (10-100), based on range width
lotModeMartingaleLot management mode: fixed, linear, Martingale, Fibonacci
perMargin10Margin percentage (0.1-20)
lotMultiplier2Martingale lot multiplier (1-2)
rangeMultiplier1Range multiplier after loss (1=disabled, 1-2)

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.