All In One Breakout EA Optimisation

All In One Breakout EA Optimisation

13 November 2025, 15:57
Dilwyn Tng
0
52

All-In-One Breakout EA – Optimisation & Strategy Guide

This guide explains:

  1. How to optimise an Expert Advisor (EA) in MetaTrader 5.
  2. How to re-optimise Strategy A using the supplied .ini file and Strategy A setfiles.
  3. How to discover and optimise new strategies with the All-In-One Breakout EA.

1. How to Optimise an EA in MT5

1.1 Open Strategy Tester

  1. In MetaTrader 5, press Ctrl+R or click View → Strategy Tester.
  2. In the Strategy Tester panel:
    • Expert: select All-In-One Breakout EA.
    • Symbol: choose the instrument you want to test (for example XAUUSD, US30, BTCUSD).
    • Period: choose the timeframe (for example M1).

1.2 Select Testing Dates & Deposit

  1. In Strategy Tester, click the Settings tab.
  2. Choose:
    • Testing period (From / To dates).
    • Initial deposit and currency.
    • Leverage (for example 1:100).

1.3 Choose Testing Model

For optimisation and validation we recommend:

  • For optimisation runs: Open prices only (OHLC) – faster and suitable for parameter search.
  • For final check / validation: Every tick based on real ticks – slower but more accurate and closer to real execution.

1.4 Load EA Inputs & Enable Optimisation

  1. Click Expert properties….
  2. Go to the Inputs tab.
  3. Click Load and select the provided .set file for your symbol/timeframe, for example:
    • A-XAUUSD-2020.set
    • A-US30-2020.set
    • A-GBPUSD-2020.set, etc.
  4. Tick the checkbox in front of each parameter you want to optimise. Leave it unticked for parameters you want to keep fixed.
    Important: only checked inputs will be optimised; unchecked inputs stay at the loaded values.
  5. In Strategy Tester, tick the Optimization option (usually next to the Start button).

1.5 Understanding Start / Step / Stop

For each optimised input you will see three columns: Start, Step, Stop.

  • Start – first value to be tested.
  • Step – increment between tests.
  • Stop – last value to be tested.

Example – Lot Size

  • Start: 0.01
  • Step: 0.01
  • Stop: 0.10

The tester will try: 0.01 → 0.02 → 0.03 → … → 0.10.

General advice:

  • Use a realistic range – avoid searching from 0 to 10,000 without a reason.
  • Smaller Step = more precise, but much slower (more combinations).
  • For the first scans, use a coarse Step (bigger), then refine the range around the best area with a smaller Step.
  • If you optimise many inputs at once, total combinations grow very quickly. Keep the number of optimised inputs limited and focused.

1.6 Run the Optimisation

  1. Check that:
    • Optimisation is enabled.
    • Testing model is set to Open prices only (OHLC).
    • Inputs and ranges are correct.
  2. Click Start.
  3. Wait for the optimisation to finish. The results will appear in the Optimization Results tab.

1.7 Read & Select Results

  • Sort by Profit, Expected Payoff, Drawdown, or other criteria according to your risk preference.
  • Double-click a result to run a single backtest with those inputs.
  • For your best candidates:
    • Switch model to Every tick based on real ticks.
    • Run a high-quality backtest for confirmation.

2. How to Optimise Strategy A (provided setfiles)

Strategy A setfiles are pre-designed breakout profiles that already include:

  • Recommended box time and breakout logic for each symbol.
  • Reasonable money management defaults.
  • Working filters (ADX, ADR, Bollinger Bands, 3-MA, etc.) where applicable.

2.1 Files You Receive

  • Backtest .ini file (Strategy Tester settings, date range, deposit, etc.), for example:
    • Strategy A - All In One Breakout-Backtest.ini
  • Strategy A setfiles (per symbol/timeframe), for example:
    • A-XAUUSD-2020.set
    • A-US30-2020.set
    • A-GBPUSD-2020.set
    • A-GBPJPY-2020.set
    • A-USDJPY-2020-2.set
    • A-USTEC-2020-2.set
    • A-DE40-2020.set
    • A-BTCUSD-2020.set

2.2 Load the Strategy A Testing Template (.ini)

  1. Open Strategy Tester.
  2. In the Settings area, click the Load button (where symbol, dates, deposit etc. are configured).
  3. Select Strategy A - All In One Breakout-Backtest.ini.
  4. This will automatically set:
    • Symbol or symbol group (if included).
    • Timeframe.
    • Testing period (year).
    • Initial deposit and leverage.
    • Suggested testing model for Strategy A.

2.3 Load a Strategy A Setfile

  1. Click Expert properties… → Inputs → Load.
  2. Choose the correct setfile for your symbol/timeframe, for example:
    • A-XAUUSD-2020.set for XAUUSD.
    • A-US30-2020.set for US30.
  3. Click OK to apply inputs.

2.4 What is Pre-Tuned in Strategy A

Strategy A is already pre-tuned:

  • Range Start Time – start of the breakout box (range start time).
  • Range End Time – end of the breakout box (range end time).
  • Cancel Opposite Orders (COO) – automatically removes the opposite pending side after one order triggers.
  • Max Buy Trades / Max Sell Trades – set to ensure only one buy and one sell setup per day.
  • Pending Order Cancel Time – removes unfilled pending orders after a specific time.
  • Close Positions by Time – closes all active positions based on the configured rule.
  • Position Close Time – exact time used to force-close open trades for the day.

You may need to fine-tune Strategy A according to your broker (spread, execution, swaps, server time, etc.).

For other strategies, you may also need to fine-tune these groups (in addition to the above):

  • Money Management
    • Equity / Balance risk percentage, fixed lot, or risk-per-trade.
    • Use small ranges around your desired risk when optimising.
  • Stop Trades Behaviour (how trades are closed)
    • By time (Close Positions by Time).
    • By Take Profit (with or without trailing stop).
    • Combination: time exit or TP, whichever comes first.
  • Stop Loss / Take Profit
    • Fixed points, ATR-based factors, ADR-based ranges.
    • Start with coarse ranges, then zoom in around profitable zones.
  • Trailing Stop
    • Trailing distance, trailing step, and any dynamic options.
    • Avoid trailing steps smaller than the spread, to prevent the stop from being triggered by spread noise.
  • Filter thresholds
    • ADX level, ADR range filter, Bollinger Band width, 3-MA trend, etc.
    • Optimise in logical ranges (for example, ADX 15–35 instead of 1–100).

Tip: Do not randomly switch everything on or off at once. Focus on one to three related groups at a time.

2.5 Example – Optimising Risk % in Strategy A

Suppose Strategy A uses “Equity Risk Percentage”:

  • Start: 1.0
  • Step: 0.5
  • Stop: 5.0

This will test risk from 1% to 5% in 0.5% increments.

Recommended process:

  • Use Open prices only (OHLC) for the optimisation.
  • Select the best few candidates.
  • Confirm them with Every tick based on real ticks for final quality check.

2.6 Example – Optimising Box / Breakout Distance

For Strategy A, the box time is already defined for you in the setfile. You may fine-tune:

  • Zone Level / Offset – distance from box high/low where pending orders are placed.

Example:

  • Start: 25
  • Step: 5
  • Stop: 75

This means your breakout entry will be tested at different distances above/below the range (25, 30, 35, …, 75).

2.7 Validate the Final Strategy A Settings

  1. After optimisation, choose the best result(s) from the optimisation table.
  2. Run a final backtest using Every tick based on real ticks for the same period.
  3. Optionally, also test on:
    • A different year (out-of-sample period).
    • A different broker or account type.

3. How to Discover & Optimise New Strategies with AIO Breakout EA

The All-In-One Breakout EA lets you build your own breakout strategies on top of the Strategy A logic. A strategy is mainly defined by:

  • Box time (start / end of the range).
  • Breakout distance and direction (buy only, sell only, or both).
  • Trailing Stops
  • Close Type (by TP, Close Time or Both)
  • SL/TP style (fixed, ATR, ADR, trailing, time-based exit).
  • Confluence filters (3-MA trend, ADX, ADR, Bollinger Band width, day filter, etc.).

3.1 Workflow to Build a New Strategy

  1. Choose instrument and timeframe.
    • Examples: XAUUSD M15, US30 M5, DE40 M15.
  2. Start from a similar Strategy A setfile.
    • Load the closest existing Strategy A setfile (same symbol or similar volatility).
    • This keeps money management, safety limits and filters in a sensible range.
  3. Define the new box idea.
    • Examples: Asia range, London pre-open, London first hour, New York open, daily first two hours.
    • Adjust Range Start and Range End times accordingly.
  4. Set a reasonable SL/TP template.
    • Fixed points or ATR/ADR-based values.
    • Keep them wide enough so trades can breathe; refine later via optimisation.
  5. Decide which filters to use.
    • 3-MA trend filter (only trade in trend direction).
    • ADX (avoid very low volatility periods).
    • ADR/Bollinger Band width (avoid too small or too large ranges).

3.2 Coarse Optimisation (Idea Search)

In this phase you search for areas that look promising, not exact perfect numbers.

  • Use a wider Start–Stop range and a larger Step.
  • Only optimise a few groups at a time:
    • Box range and entry Zone Level.
    • Stop Loss / Take Profit.
    • One or two main filters (for example ADX and MA trend).
  • Use Open prices only (OHLC) to keep optimisation fast.

Example – searching box end time

  • Range End Hour: Start = 7, Step = 1, Stop = 11.

This tests box end times from 07:00 to 11:00 in 1-hour steps.

3.3 Fine Optimisation (Local Tuning)

  1. Take the best 5–10 results from coarse optimisation.
  2. Identify the cluster of good parameters (for example, Zone Level around 35–45, SL 200–260 points).
  3. Run a second optimisation with:
    • Smaller ranges (narrower Start–Stop).
    • Smaller Step.

Example – fine tuning Zone Level

  • Start: 30, Step: 2, Stop: 50.

3.4 Validation & Robustness

  • Test the final candidate with:
    • Tick or Every tick based on real ticks on the same period.
    • Another year (or different date range) not used in optimisation.
    • If possible, a different broker or account type.
  • A strategy is more robust when:
    • Results remain acceptable on out-of-sample data.
    • Small parameter changes do not completely destroy performance.

3.5 Saving Your New Strategy

  1. Once you are satisfied with your settings:
    • Open Expert properties → Inputs.
    • Click Save and store your configuration as a .set file (for example MyStrategy-XAUUSD-M15-2021.set).
  2. You can:
    • Load this setfile on live or demo charts.
    • Reuse it later for re-optimisation or further tuning.

4. Randomisation Settings (Recommended for Prop Firms)

4.1 Why Enable Randomisation?

Many prop firms monitor trading behaviour for patterns such as:

  • Repetitive trading behaviour.
  • Predictable SL/TP placement.
  • Fixed breakout levels at identical times every day.
  • Automated or non-discretionary execution patterns.

If every trade happens at exactly the same price levels with identical timing, some prop firms may flag this as:

  • Copying from someone else
  • Copying from another account

Randomisation introduces small variations in time and price, creating a more natural trading footprint while keeping the strategy logic intact.

4.2 What Can Be Randomised?

The All-In-One Breakout EA supports randomisation in multiple areas:

  • Box Time Randomisation – small variations in the start and end time of the breakout range.
  • Offset Randomisation – small variations in breakout entry distance from the box high/low.
  • SL Randomisation – small random differences in stop-loss distance.
  • TP Randomisation – randomised take-profit distance.
  • Trailing Stop Randomisation – variations in trailing step/level to avoid repetitive trailing patterns.

4.3 Recommended Randomisation Settings for Prop Firms

1. Box Time Randomisation

  • RandomRange = true
  • RangeSecondDelta = 60–180 seconds

This introduces natural variation of about ±1–3 minutes around the configured box times.

2. Offset Randomisation

  • RandomOffset = RandomOffsetByPoint or RandomOffsetByPC
  • RandomOffsetPoint = 2–5 points
  • RandomOffsetPC = 1–3%

3. SL Randomisation

  • RandomSL = RandomSLByPoint or RandomSLByPC
  • RandomSLPoint = 3–10 points
  • RandomSLPC = 1–5%

4. TP Randomisation

  • RandomTP = RandomTPByPoint or RandomTPByPC
  • RandomTPPoint = 3–10 points
  • RandomTPPC = 1–5%

5. Trailing Stop Randomisation

  • RandomTS = RandomTSByPoint or RandomTSByPC
  • RandomTSPoint = 1–3 points
  • RandomTSPC = 1–2%

Note: Keep all randomisation values small. The goal is to add variation and reduce pattern detection risk, not to completely change the strategy behaviour.

4.4 Best Practices for Prop Firms

  • Enable randomisation for:
    • Box Time.
    • Offset.
    • SL / TP.
  • Use small random ranges (for example 1–5% or a few points).
  • Do not enable randomisation when doing optimisation. Optimise with fixed values, then enable randomisation afterwards for live or prop trading.
Note: By using randomisation, AIO Breakout EA does not gurannttee payment from your prop firm, do everything at your own risk.

5. Important Settings

These EA settings are important for fast and meaningful optimisation:

  • Minimal Trailing Step
    Ensure the trailing step is greater than the spread for realistic optimisation. You do not need to set this if you do not use trailing stop.
    Set the minimal trailing step in points to about 1.5–3 × spread.
  • Fast Backtest Mode
    Enable fast backtesting using the appropriate mode:
    • T Type (OCHL) with FBT_S, or
    • S Type (Ticks / All Ticks)
  • Backtest Timezone
    Configure broker timezone correctly:
    • Winter Offset: for example, IC Markets = 2, Exness = 0
    • Summer DST Offset: for example, IC Markets = 3, Exness = 1


6. Final Summary

  • Use Open prices only (OHLC) for faster optimisation runs.
  • Use Every tick based on real ticks for final verification of the best parameter sets.
  • Use the provided .ini file to quickly load recommended backtest settings for Strategy A.
  • Use the provided Strategy A setfiles as a pre-tuned starting point for each symbol.
  • Control optimisation via Start / Step / Stop with realistic ranges and reasonable steps.
  • For new strategies:
    • Adjust box time, entry distance, SL/TP style and filters.
    • Run coarse optimisation, then fine optimisation, then validation.
  • For prop firm accounts:
    • Enable randomisation on time and price-related parameters.
    • Keep random ranges small so the core strategy behaviour remains stable.