EA-45639 · Breakout

RectangleTest

This EA identifies rectangular price consolidation ranges (rectangle patterns) on the chart and trades breakouts from those ranges. It automatically draws rectangle zones based on price action and enters positions when price breaks above or below the established boundaries.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryBreakout
RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsRectangle Pattern, Price Action, Support/Resistance
AuthorMetaQuotes Ltd.

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

  • Has no stop loss or trailing stop

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

The strategy concept is based on breakout trading from rectangular consolidation patterns, where price trades sideways within a horizontal range before breaking out. Entry conditions are triggered when price closes above the upper boundary of the rectangle for a long position, or below the lower boundary for a short position, entering in the direction of the breakout. Exit conditions typically include setting a stop loss near the opposite boundary of the rectangle, while take profit is calculated based on one or more times the height of the rectangle pattern, and trailing stops may also be employed. Position sizing takes into account the width of the rectangular range to measure the breakout target amplitude, as wider rectangles imply greater breakout potential. Money management typically uses fixed lot sizes or calculates position size based on a percentage of account risk. The core advantage of this strategy is that rectangle patterns are significant signals of market direction after consolidation, and breakouts often carry strong momentum.

Strengths

  • Rectangle breakout is a classic chart pattern strategy with clear and understandable logic
  • Stop loss placement is well-defined at the opposite boundary of the rectangle, making risk manageable
  • Breakout trading follows market momentum direction, with decent win rates when proper filters are applied
  • Strategy automation eliminates subjective judgment and ensures disciplined execution

Weaknesses

  • High risk of false breakouts where price briefly breaks the range then reverses, triggering stop losses
  • Automatic rectangle pattern recognition may lack accuracy and carry misidentification risk
  • Lacks an overall market trend filter, which may lead to frequent false signals in choppy markets
  • Fixed lot sizing does not dynamically adjust based on account risk, making money management inflexible

Possible improvements

  • Add volume confirmation filter requiring increased volume on breakout to reduce false breakouts
  • Add higher timeframe trend filter to only enter breakouts in the direction of the broader trend
  • Implement dynamic position sizing based on account risk instead of fixed lot sizes

Risk assessment

Overall risk: Medium

  • False breakouts may lead to consecutive stop losses and frequent losses in range-bound markets
  • If stop loss is not set or is too wide, a single trade may incur significant loss

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
RectangleHeightautoMinimum height requirement for rectangle pattern
RectanglePeriods20Lookback periods for rectangle pattern detection
BreakoutPips5Additional pips for breakout confirmation
StopLossPips50Stop loss in points
TakeProfitPips100Take profit in points
LotSize0.1Lot size for test orders
MagicNumber45639EA magic number to identify order source

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.