Why I Built a Gold EA with Breakout, Mean Reversion and Momentum Logic - Testing Checklist

Why I Built a Gold EA with Breakout, Mean Reversion and Momentum Logic - Testing Checklist

27 7月 2026, 09:29
Atsushi Katayama
0
6

Gold does not stay in one market condition.

At times, XAUUSD moves through an important level and continues strongly. At other times, price stretches too far, loses momentum and returns toward a recent range. There are also periods when directional momentum develops without a clean textbook breakout.

This is why I preferred a multi-strategy structure instead of asking one entry idea to handle every type of gold market. Ninja Trinity XAU combines breakout, retest, momentum, support and reversal logic inside one portfolio. The objective is not to make every strategy trade at the same time. It is to give the EA different ways to respond when market conditions change.

However, adding more logic does not automatically make an EA reliable. A multi-strategy system still needs careful testing.

The practical point

Breakout, mean-reversion-style reversal and momentum entries should not be judged only by the final net profit.

A useful test should answer three separate questions:

  1. Does the EA operate correctly under the broker’s XAUUSD specifications?

  2. Does the overall portfolio remain controlled across different market regimes?

  3. Are the results still acceptable when costs, execution delay and the test period change?

For an XAUUSD system, these questions are especially important because spreads, tick size, contract size, volatility and execution conditions can differ considerably between brokers.

MT5 testing checklist

Before starting the test

  • Select XAUUSD or your broker’s equivalent GOLD symbol.

  • Use the recommended M5 chart setting.

  • Confirm that the historical period is fully downloaded.

  • Prefer “Every tick based on real ticks” when reliable broker tick data is available.

  • Check the symbol’s digits, tick size, tick value, contract size, minimum lot and lot step.

  • Enter a realistic initial deposit and account leverage.

  • Include commission and swap where they apply.

  • Begin with Fixed Lot mode so that position-size growth does not hide the underlying trade sequence.

Test more than one type of market

Do not choose only a period with a smooth upward gold trend. Include:

  • a strong bullish trend;

  • a bearish period;

  • a wide sideways range;

  • a volatility expansion;

  • a quieter low-volatility period;

  • a period containing sharp reversals or unusually wide spreads.

The purpose is to see whether one part of the portfolio can contribute when another part is less suited to the current regime. It is also important to identify periods in which several strategies lose together, because this determines the real portfolio drawdown risk.

Check execution sensitivity

Run the same test more than once:

  • once with No Delay;

  • once with a realistic Fixed Delay;

  • once with Random Delay;

  • with a wider spread assumption if your broker’s gold spread changes significantly.

If a small change in delay or spread completely changes the result, the system may be more execution-sensitive than the first report suggests.

Review the Journal and visual trades

The final graph is not enough.

Check the Strategy Tester Journal for:

  • invalid volume messages;

  • insufficient margin;

  • rejected orders;

  • invalid stop levels;

  • missing history;

  • initialization or runtime errors.

Then use Visualization for selected periods. You do not need to watch every trade. A sample from trending, ranging and high-volatility conditions can help confirm that entries, exits and position sizing behave as expected.

Review the report beyond net profit

Record at least:

  • total number of trades;

  • profit factor;

  • maximum balance drawdown;

  • maximum equity drawdown;

  • longest losing streak;

  • average profit and average loss;

  • long-trade and short-trade distribution;

  • yearly or quarterly consistency;

  • performance during the most difficult period.

A large final balance can be misleading when automatic compounding is enabled. For this reason, I first inspect a fixed-lot test, then separately examine the automatic risk-based mode.

Use an out-of-sample period

Do not optimize and judge the EA on exactly the same data.

Keep the latest part of the data as an out-of-sample period, or use MT5’s Forward setting during optimization. The first period can be used for development or parameter selection, while the later period checks how those choices behave on data that was not used for fitting.

Finish with broker-specific demo testing

Backtesting is only one stage. After the Strategy Tester:

  • test the EA on the broker and symbol you intend to use;

  • confirm that orders are accepted at the expected lot size;

  • compare typical live spread with the test assumptions;

  • monitor entries, exits and restart behavior;

  • allow enough time to observe more than one market condition.

The free demo is available on the Ninja Trinity XAU MQL5 Market page. Please test it with your own broker conditions before any live use:

https://www.mql5.com/en/market/product/185737

Closing note

The reason for combining breakout, reversal and momentum logic is not to claim that one EA can predict every gold move. It is to avoid relying on only one market behavior.

The value of that design should be judged through realistic testing: accurate data, fixed-lot analysis, different market regimes, execution stress tests, out-of-sample checks and broker-specific demo operation.

Risk notice

Backtest and demo results are hypothetical and do not guarantee future performance. Live trading can differ because of spread, slippage, execution delay, commissions, swaps, liquidity, broker specifications and changing market conditions. XAUUSD can be highly volatile. Use only risk capital and select a lot size appropriate for your account.