Cross Range Portfolio EA
- Experts
- Versione: 1.1
- Attivazioni: 10
Cross Range Portfolio EA — Z-Score Mean Reversion for Commodity Cross Pairs, With a Hard Stop on Every Order
Cross Range Portfolio EA trades a small portfolio of range-bound commodity cross pairs — AUDCAD and NZDCAD by default, AUDNZD as an option — from one H1 chart. It waits for a rare statistical stretch (a 3-standard-deviation move away from the 50-bar mean), opens one position per pair with a server-side stop-loss, and lets the take-profit follow the moving mean back.
There is no grid, no martingale and no averaging down. The risk of every position is fixed before it opens, so the worst case is known in advance — which also makes the EA suitable for prop-firm accounts.
Video: https://www.youtube.com/watch?v=XVnculjL8UM
How the strategy works
- Signal: on every closed bar of the signal timeframe (default H1) the EA computes the z-score of price against its 50-bar mean and standard deviation.
- Entry: buy when z ≤ −3.0, sell when z ≥ +3.0 (adjustable). Optional confirmation: wait for a close back inside the band. Optional RSI filter.
- Filters: volatility filter (current ATR no more than 1.6 × its 100-bar average), minimum distance to target, maximum spread, entry window (default 13–21 server time on a GMT+2/+3 broker), Monday start hour, Friday cutoff, rollover filter around server midnight, and a news filter based on the built-in MT5 economic calendar (no WebRequest needed).
- Exit: take-profit at the mean, updated as the mean moves (can be switched to a fixed target); optional exit z-score; time stop after 48 signal bars.
- Protection: hard stop-loss at 4 × ATR(14), sent with the order and kept on the server.
Portfolio and risk management
- One position per pair, sized from a fixed percentage of equity (or a fixed lot, still capped by the risk limit).
- Max total open risk across all pairs (% of equity) and max same-direction legs per currency, so the correlated pairs cannot turn into one big bet.
- Prop-firm protection: daily loss limit and maximum drawdown limit (static from initial balance, or trailing from peak equity). When a limit is reached the EA closes its positions and stops opening new ones.
- Regime circuit breaker (optional): D1 ADX, D1/W1 breakout and ATR-expansion checks can block counter-trend entries (or all entries) on a pair and optionally close counter-trend positions.
- Friday close-all option, slippage limit, magic number.
Live panel
- One table for all pairs: z-score with position gauge, RSI, regime state, spread, position, open risk and P/L.
- Daily loss, drawdown and open-risk meters against their limits; currency exposure per AUD / NZD / CAD; closed and floating P/L.
- Pause / Resume and two-step Close All buttons; dark and light theme; automatic high-DPI scaling; movable and minimisable.
Presets (included as .set files)
- Conservative / Prop-Firm (= default inputs): 1.0 % risk per trade, max open risk 3 %, daily loss 4 %, max drawdown 8 %.
- Balanced: 2.0 % risk per trade, daily loss 6 %, max drawdown 20 %.
- Aggressive (not for prop firms): 2.5 % risk per trade, daily loss 8 %, max drawdown 30 %.
Risk levels were sized from 5,000-run Monte-Carlo drawdown tests of the real-tick backtest (95th-percentile drawdown about 8.5 % / 20 % / 27 %).
Backtest (MT5 Strategy Tester, every tick based on real ticks)
AUDCAD + NZDCAD, H1, 2020.03.01 – 2026.11.07, deposit 10,000 USD, Conservative preset, commission and swaps included:
- Net profit +7,296 USD, profit factor 1.83, 317 trades, 71.9 % winning trades, maximum equity drawdown 5.1 %.
- Settings were chosen on 2020–2023 data only. On the later 2024–2026 period the profit factor was 2.43 (121 trades); in-sample it was 1.48 (196 trades). 2023 was a flat year (profit factor 1.01).
- Anchored walk-forward (parameters re-chosen each year on earlier data only): all five test years 2022–2026 profitable, combined profit factor 1.37.
These are backtest results on one broker's data. Spreads, commission and swaps differ between brokers. Past performance does not guarantee future results.
Recommendations
- Attach the EA to one chart (for example AUDCAD H1). The EA trades all enabled pairs from that chart; broker prefixes/suffixes are detected automatically.
- Account: ECN/raw-spread account recommended; hedging or netting; minimum deposit about 500 USD with the Conservative preset (lot sizes must be able to respect the risk per trade).
- The default entry window assumes a GMT+2/+3 broker server time. Adjust the hours if your broker uses a different time zone.
- Expect a modest trade count (roughly 40–50 trades per year on two pairs): the EA waits for rare stretches by design.
- Run it on a VPS for uninterrupted operation.
Main inputs
- Portfolio: execution mode (portfolio / chart symbol only), pairs on/off, symbol prefix/suffix, signal timeframe, magic number.
- Risk: risk per trade, hard stop (× ATR), fixed lot, max total open risk, max open positions, max same-direction legs per currency.
- Entry signal: band period, entry z, exit z, re-entry confirmation, dynamic take-profit, RSI filter, ATR period, volatility filter, min target, time stop.
- Regime circuit breaker: on/off, ADX levels, D1/W1 lookbacks, ATR expansion, action on breakout.
- Time & cost filters: entry hours, max spread, rollover filter, Monday start, Friday cutoff and close-all, news filter.
- Prop-firm protection: daily loss limit, max drawdown limit and reference, lock reset, max slippage.
- Panel: show/hide, theme, scale.

