Skip to content
XauStack

Gold EA timeframe: M5, M15 or H1?

Updated5 min read

Strategy TesterStrategiesXAUUSD

The chart period matters only when a gold EA’s code borrows it, which you can check by running the same window on two charts in the Strategy Tester’s real-ticks mode and comparing the deal lists.

  • An EA has two timeframes: the chart it is attached to, and the ones its code reads. Only the second is the strategy. Whether the first matters depends on how the EA was written.
  • In the Strategy Tester’s real-ticks mode the chart period does not change the ticks the EA sees. In “Open prices only” it changes almost everything.
  • The timeframe a strategy is designed on sets how small its stops are, and so how much of each trade the spread and commission take.

Gold EA M5 or M15 or H1 is a question with a hidden premise: that the chart you drop an Expert Advisor onto decides how it trades. Sometimes it does. Often it does not. Page one of the search mostly answers with a preference. This guide is about the mechanism, so you can tell which case you are in.

Two timeframes, not one

An EA runs on a chart, and MetaTrader calls it when prices move: “The NewTick event is generated only for EAs upon receiving a new tick for a symbol of the chart the EA is attached to” (MQL5 documentation). Note what that sentence ties the EA to: the symbol of the chart. Nothing in it mentions the chart’s period. A new XAUUSD tick arrives on an M5 chart and an H1 chart at the same moment.

What the EA does with that tick is up to its code. When it asks for a moving average, a high or a low, it names a timeframe. It can name one explicitly — M15, H1 — or it can name PERIOD_CURRENT, which MQL5 defines as “the current period of a chart, at which a mql5-program is running” (MQL5 documentation).

That one choice decides the answer to the whole question.

When the chart timeframe changes the strategy

An EA written with PERIOD_CURRENT borrows its timeframe from the chart. Put it on M5 and every indicator, range and bar count it reads is M5; move it to H1 and it is, in effect, a different strategy with the same name. Its stops, its trade count and its results will all move.

This is why a vendor’s “use M15” line matters and should be taken literally. It is also why you cannot answer the question from the outside: the source is usually closed. The practical test is below.

When it does not

An EA that names its timeframes explicitly reads the same data whatever chart it sits on. The chart becomes a place to be attached and nothing more.

You can see this from the outside. Run such an EA twice in the Strategy Tester over the same window and deposit, once on M15 and once on M30. If the deal lists match trade for trade, the chart did not enter into it. A few report figures can still differ, such as the bar count, because they are computed per bar of the chart you chose, not per trade.

What the tester’s period changes

The Strategy Tester asks you to “select the main chart for testing and optimization” (MetaTrader 5 Help), and how much that matters depends on the tick mode.

In Every tick based on real ticks, “Testing is performed using real ticks of financial instruments, accumulated by brokers. No simulation is performed” (same page). The ticks do not depend on the period you picked, which is why two runs on different charts can agree at all.

In Open prices only, the period is nearly everything. MQL5’s testing notes say ticks “are generated based on the OHLC prices of the timeframe selected for testing”, that the EA’s OnTick() “runs only at the beginning of the bar”, and that “you cannot access data of the timeframe lower than that used for testing/optimization” (MQL5 documentation). A test on H1 in that mode sees one price an hour.

The practical test for a closed EA: run the same window twice in real-ticks mode, once on the chart the seller names and once on another. If the deal lists match, the chart does not matter. If they differ, it does, and the seller’s chart is the only one the published figures describe.

What the strategy’s own timeframe changes

The timeframe a strategy is designed on does change things, just not through the chart. A strategy built on five-minute structure sets smaller stops and trades more often than one built on hourly structure, and two costs follow.

Spread against the stop. Spread is paid per trade, and the tester takes it “from historical data” rather than modelling it (same MQL5 page). The same spread is a larger fraction of a small stop: a 30-cent spread is a tenth of a $3 stop and a fiftieth of a $15 one. Short-timeframe strategies are the ones most exposed to a broker whose spread is wider than the one the backtest used.

Trade count and commission. Commission is paid per lot, whatever the timeframe. In our Strategy Tester runs over the same 2026 window, Dawnbreak on M5 took 556 trades; Reclaim on H1 took 65. The tester charged neither of them commission.

Which chart our strategies expect

Each strategy page names a chart: M5 for Dawnbreak and Meridian Trend, M15 for Helix Basket and Helix Trail, M30 for Aurum Recoil, and H1 for Reclaim. Attach to the named chart; that is the one the strategy page and its backtest page both list. To check any other chart, use the practical test above with the free Backtest Edition from the strategies page.

Before you act on any of this

Every figure above comes from the MetaTrader 5 Strategy Tester over 1 January 2026 to 7 September 2026 on IC Markets demo data, never from live trading, and no result is promised anywhere on this site. Two departures apply to all of them: the tester charged no commission on XAUUSD, while real trading on that account cost roughly $7 per lot round-turn that the net does not deduct, and fills are modelled rather than executed. History Quality was 63 % because real ticks begin on 21 April 2026. Before you choose a chart or a Product, read the risk disclosure.

All guides

Book a call