Range Breakout
This EA identifies a defined price range (consolidation period) and places pending orders or enters market orders when price breaks out above or below that range. It is a classic range breakout strategy that aims to capture momentum moves following periods of low volatility and price compression.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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 range breakout, where the EA first calculates the high and low of price over a specified time window to form a trading range. Entry conditions trigger a buy when price breaks above the range high and a sell when price breaks below the range low, capitalizing on momentum continuation after the breakout. Exit conditions typically include fixed take-profit and stop-loss levels, or a stop-out when price re-enters the range, invalidating the breakout signal. Position sizing may use fixed lot sizes or dynamic lot calculation based on account risk percentage. Money management may include maximum position limits and daily loss caps, though the specific implementation depends on parameter configuration. The overall strategy logic is clear and belongs to the early trend-capture category, but it tends to underperform in markets with frequent false breakouts.
Strengths
- Clear and simple strategy logic that is easy to understand and verify
- Range breakout is a classic and well-tested trading concept that performs well in trending markets
- Defining the range by time window avoids around-the-clock trading risk and reduces false signals
Weaknesses
- False breakouts are the primary risk, as price briefly breaks out then reverses, causing frequent stop-loss hits
- Lacks a volatility filter mechanism, which can generate excessive invalid trades in low-volatility choppy markets
- Fixed take-profit and stop-loss may not adapt well to different market volatility regimes, lacking self-adaptive adjustment
Possible improvements
- Add ATR or volatility filtering to only enter on breakouts after volatility contraction, improving breakout validity
- Introduce breakout confirmation mechanisms such as requiring close-price breakout or volume confirmation to reduce false breakout losses
Risk assessment
Overall risk: Medium
- High risk of consecutive stop-losses from false breakouts, especially in ranging/choppy markets
- Lacks trading session and spread filtering, which may lead to unfavorable entries during low-liquidity or high-spread periods
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
RangePeriod | 20 | Bars for calculating range high/low |
BreakoutOffset | 50 | Breakout entry offset in points to avoid false breakouts |
StopLoss | 300 | Auto stop loss in points |
TakeProfit | 600 | Auto take profit in points |
Lots | 0.1 | Fixed trading lot size |
MagicNumber | 26451 | EA magic number; 0 monitors all orders |
TimeStart | 00:00 | Range calculation start time |
TimeEnd | 08:00 | Range calculation end time |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.