Session Breakout Portfolio EA
A session-range breakout portfolio for gold, the Nikkei and the yen, traded from one chart.
Key features
- Default portfolio: JP225, XAUUSD in two sessions (London + New York) and USDJPY, one stop-protected trade per market session per day
- JP225 – Tokyo 09:00–09:30 opening range with compression and volatility regime filters, exit 15:00 Tokyo
- XAUUSD – New York 09:30–09:45 range with daily trend filter, plus a London Asian-range breakout (00:00–07:00 London, target 3R)
- USDJPY – Asian range 00:00–07:00 London, breakout into the London session, trailing stop 1.0 daily ATR
- Conservative (0.23%): backtest recovery factor 16.2, profit factor 1.30, max drawdown 7.7%
- Balanced (0.70%, default): backtest recovery factor 7.5, profit factor 1.33, max drawdown 16.7%
- Aggressive (0.90%): backtest recovery factor 6.0, profit factor 1.33, max drawdown 22.1%
Video
Demo and walk-through of Session Breakout Portfolio EA.
Full description
The complete feature description, as published on the MQL5 Market.
A session-range breakout portfolio for gold, the Nikkei and the yen, traded from one chart.
Every market has a quiet session and an active open. The EA builds the range in the quiet session (Asian range, pre-open or opening range), in the exchange's own time zone with automatic daylight saving, and trades the breakout at the active session open with OCO stop orders. One stop-protected trade per market per day. No grid, no martingale, no averaging.
Default portfolio (3 markets, 3 sessions, three time zones)
- JP225 – Tokyo 09:00–09:30 opening range, compression filter (range ≤ 0.4 daily ATR), volatility regime filter (daily ATR between the 20th and 90th percentile of the last year), trailing stop 0.25 daily ATR, exit 15:00 Tokyo
- XAUUSD / GOLD – New York 09:30–09:45 range with daily trend filter, exit 15:55 New York
- USDJPY – Asian range 00:00–07:00 London, breakout into the London session, break-even at 1R
Six more slots are included and fully configurable (US30, USTEC, DE40, UK100, EURUSD, GBPUSD), all disabled by default. UK100, EURUSD and GBPUSD did not hold up in our out-of-sample test on ECN broker data – we prefer to tell you that rather than ship them switched on. The US and German index cash-open breakouts are covered by our Index Portfolio EA; this EA concentrates on the markets that product does not trade (daily-return correlation with its default portfolio in our backtests: about 0.01), so the two can run side by side without doubling the same trades.
Risk profiles
Choose one input – Conservative, Balanced (default) or Aggressive – and the EA sets the risk per trade, the total open-risk cap and the daily loss limit together. The profiles were calibrated on the default portfolio so that the maximum equity drawdown of the 2021–2026 backtest is about 10%, 20% and 25%. Every profile uses the same entries and the same hard stop on every trade; only the position size changes. Custom uses your own risk inputs (% of balance or equity, fixed money or fixed lots).
- Conservative (0.23%): recovery factor 7.7, profit factor 1.25, max drawdown 10.0%
- Balanced (0.70%, default): recovery factor 5.9, profit factor 1.23, max drawdown 18.2%
- Aggressive (0.90%): recovery factor 4.5, profit factor 1.23, max drawdown 24.6%
Backtest, default portfolio, 10 000 USD, every tick based on real ticks, ECN broker data 2021-01 to 2026-10. Higher risk means deeper drawdowns; backtest results are not a guarantee of future results.
How it works
- Range: high/low of the quiet session window (M1 data), drawn on the chart.
- Range filters: minimum / maximum range size in multiples of the daily ATR(14), optional daily trend filter (prior close vs daily EMA), volatility regime filters (ATR5/ATR50 and, per market, the percentile of today's daily ATR within the last 250 days), trading days.
- Entry: OCO buy stop above and sell stop below the range (or, optionally, a candle close beyond the range). When one side fills, the other is cancelled immediately.
- Exits: hard stop (fraction of the range, capped by ATR), optional R-multiple target, optional break-even, optional trailing stop per market (distance in daily ATR, starting at a chosen R), and a session time exit.
- Exchange time with automatic DST: sessions are entered in New York, London, Frankfurt or Tokyo time. The EA converts them to your broker's server time (auto-detected, or GMT+2/+3, fixed or EU-DST modes) and handles the US/EU daylight saving gap weeks.
Portfolio risk engine
- Risk profile (Conservative / Balanced / Aggressive) or Custom: risk per trade as % of balance, % of equity, fixed money or fixed lots; min-lot protection.
- Total open-risk cap for the whole portfolio and a maximum number of positions.
- Correlation groups (US indices, EU indices, Asia indices, metals, USD pairs with USD direction): at most N same-direction positions per group.
- Prop-firm guards: daily loss limit, maximum drawdown (static or trailing; halts the EA), daily profit lock, close-all on a hard limit.
- Spread guard (spread as % of the stop), high-impact news filter (MT5 economic calendar, live).
- Free-margin check before every order, broker volume limits, stop/freeze levels and filling modes respected.
Dashboard
- One row per market: session in local time, today's range and its size in ATR, state (WAITING, BUILDING, ARMED, IN TRADE, DONE, FILTERED, BLOCKED) with the reason, today's P/L.
- Portfolio totals: positions, open risk vs cap, today's P/L %, drawdown; active risk profile and risk per trade.
- Pause / resume new entries, close-all (two-click confirm), click a market to open its chart.
- Dark and light themes, DPI scaling, movable, minimisable; docks at the right edge and shifts the chart so it never covers price.
Backtest (real ticks, ECN broker data, 2021-01 to 2026-10)
Default 3-market portfolio, Balanced profile, 10 000 USD, every tick based on real ticks:
Full period 2021-01 to 2026-10: recovery factor 5.9, profit factor 1.23, 2 621 trades, maximum equity drawdown 18.2%.
In-sample 2021-01 to 2024-06: profit factor 1.29, 1 606 trades.
Out-of-sample 2024-07 to 2026-10: profit factor 1.19, 1 015 trades, maximum drawdown 21.0%.
With a fixed risk of 25 USD per trade (no compounding) the same portfolio has a recovery factor of 11.0 and a profit factor of 1.31 (1-minute OHLC model). Each market alone kept a profit factor of 1.14 to 1.19 out of sample in our research. Monte Carlo (2 000 reshuffled trade sequences, fixed risk): 95% of the paths stay below about 12% drawdown; walk-forward: all 5 folds profitable. ECN broker tick history starts in February 2025; for earlier dates the tester builds ticks from 1-minute bars. All inputs are visible; nothing is hidden.
Method: settings were chosen on 2021-01 to 2024-06 only (in-sample) and then tested on 2024-07 to 2026-10 (out-of-sample). Markets and exit rules that failed the out-of-sample test were switched off or dropped, so the out-of-sample figures are somewhat optimistic. Backtest results are not a guarantee of future results.
Set-up
- Attach the EA to one chart (any symbol, any timeframe). Do not attach it to several charts.
- The default inputs are the recommended 3-market portfolio with the Balanced profile. Pick Conservative or Aggressive with one input. For a prop-firm challenge choose Custom and set: risk 0.15%, max open risk 1%, daily loss limit 3.5%, max drawdown 8% (preset included). To trade one market only, switch the other markets off.
- Allow Algo Trading. Broker names are resolved automatically (suffixes such as .a, m, .cash, #; aliases such as NAS100, US100, GER40, DAX40, JPN225, GOLD) and printed in the Experts log.
- Hedging or netting account. Recommended: a broker with gold and a Nikkei 225 CFD, from 1 000 USD (on small accounts some JP225 trades are skipped when the minimum lot would risk too much).
Inputs (main)
- Portfolio: magic number, comment, entry mode, candle timeframe, broker server time mode.
- Risk profile; for Custom: mode, risk %, money, lots, max lots, min-lot rule, open-risk cap, daily loss %; max positions, max per correlation group.
- Guards: max drawdown % and reference, initial balance, daily profit lock, close on guard.
- Filters: trading days, volatility regime, trend EMA, max spread, breakout buffer, late-entry limit, news filter.
- Exits: max stop in ATR, break-even lock, trailing start (R).
- Markets 1–9: symbol, enabled, time zone, range start/end, entry deadline, exit time, stop (x range), target R, min/max range in ATR, trend filter, direction, break-even R, trailing distance (x daily ATR), ATR percentile range.
The news filter uses the MT5 economic calendar, which is not available in the Strategy Tester. Trading involves risk; use money you can afford to lose and test on demo first.
Quick start
From purchase to a running expert advisor in a few minutes. Details in the install guide.
- Get the EA on the MQL5 Market page: buy, rent or download the free demo. Inside MetaTrader 5 you can also open the Market tab of the Toolbox and install it from there.
- It appears in the Navigator under Expert Advisors › Market. Open the chart named in the description (symbol and timeframe) and drag the EA onto it.
- On the Common tab tick Allow Algo Trading, and switch on the Algo Trading button in the toolbar.
- On the Inputs tab choose a risk profile, or press Load to apply a .set preset if the product ships one.
- Run it in the Strategy Tester and on a demo account first, with your own broker's data, before you trade real money.
Backtest and simulation figures are not a guarantee of future results. Trading involves risk; use risk you can afford to lose. See the risk disclaimer.
More expert advisors
Gold Edge Portfolio EA
Gold Edge Portfolio EA trades XAUUSD with six independent, simple strategies at the same time.
Index Portfolio EA
Three intraday strategies on four stock indices – US30, US100, US500 and GER40 – traded from one chart.
Bitcoin Trend Rider EA
Bitcoin Trend Rider EA is a trend-following and volatility-breakout Expert Advisor for BTCUSD, ETHUSD and other crypto CFDs.
Cointegration Pair Trading EA
Trade the relationship, not the direction.


