Which timeframe should an Expert Advisor run on?
By Benjamin Lee · Published 2026-10-11 · Updated 2026-10-30 · 4 min read
An Expert Advisor should run on the timeframe its developer designed and tested it on, which is normally stated in the manual or the setfile; there is no single best timeframe that suits every EA. Attaching one to a different chart can change its behaviour completely, even with identical settings: a 14-period indicator reads 70 minutes of price on M5 and 14 hours on H1.
- Why the chart timeframe changes how an EA behaves
- Use the timeframe the developer tested
- How to set the right timeframe in MT5, step by step
- Shorter and longer timeframes: cost and noise
- Common timeframe mistakes with Expert Advisors
- Check your backtest uses the same timeframe
- When the chart timeframe does not matter much
Why the chart timeframe changes how an EA behaves
The chart timeframe changes an EA's behaviour because its indicators and signals are calculated from candles, and a candle on M5 covers a different span of time than one on H1. The same input values, such as a period of 14, describe very different market behaviour depending on the chart.
A worked example: a 14-period indicator reads the last 14 candles. On M5 that is 14 x 5 = 70 minutes of price. On H1 it is 14 hours, on H4 it is 56 hours, and on D1 it is 14 trading days. Nothing about the EA changed, yet it is now looking at a completely different slice of market behaviour, so its entries, stops and trade count will differ.
Use the timeframe the developer tested
The manual or product page normally states the timeframe the EA was designed and tested on. Use exactly that, unless the documentation says the EA is timeframe-independent. Some EAs read a fixed timeframe internally and ignore the chart's one, and some have a Timeframe input that chooses it for you.
If the EA ships with a setfile, load it. The setfile holds the inputs that were chosen for the intended timeframe, so loading it on a different timeframe pairs the right numbers with the wrong candles.
How to set the right timeframe in MT5, step by step
Setting the timeframe takes a couple of minutes and should be done before the EA is switched on.
- Read the manual or product page and write down the stated symbol and timeframe.
- Open a chart of that exact symbol, using your broker's symbol name.
- Select the timeframe from the toolbar buttons (MT5 offers 21, from M1 to MN1) or right-click the chart and choose Timeframes.
- Attach the EA, load its setfile on the Inputs tab, and tick Allow Algo Trading on the Common tab.
- Open the Experts tab and confirm the EA loaded without errors or warnings about history data.
- Run a Strategy Tester check on the same symbol and timeframe before trusting the live chart.
Shorter and longer timeframes: cost and noise
Shorter timeframes produce more signals and more trades, which makes spread and commission a bigger share of each trade. Longer timeframes produce fewer trades and are less sensitive to small price noise, but each trade is exposed to the market for longer.
A simple cost example: if spread plus commission costs 1.5 pips per round trip and a strategy aims for 10 pips per trade, trading costs consume 15% of the target. If it aims for 100 pips per trade, the same 1.5 pips is 1.5% of it. EAs designed for short timeframes are therefore much more sensitive to wider spreads and slower execution.
- Short timeframes: more trades, more cost sensitivity, more demand on execution quality.
- Longer timeframes: fewer trades, wider stops, less cost sensitivity.
Common timeframe mistakes with Expert Advisors
Each of these can make an EA act differently from its description.
- Changing the timeframe while trades are open. The EA reinitialises, and anything it held only in memory, such as counters or levels, can be lost.
- Copying settings tuned on one timeframe to a chart on another.
- Testing on a convenient fast timeframe and running live on the designed one, or the reverse.
- Ignoring multi-timeframe EAs, which use the chart timeframe for entries but read higher timeframes for trend filters.
- Running on a chart with too little loaded history, so the indicators start with incomplete data.
Check your backtest uses the same timeframe
A backtest only describes the live set-up when the Strategy Tester period matches the timeframe you plan to use live; a test on another timeframe is a test of different signals. Use the most realistic tick model available, because an Open prices only model is only valid for EAs that make decisions once at the opening of each new bar.
When the chart timeframe does not matter much
Some EAs work on every tick and calculate from their own internal data, so the chart's timeframe only affects what you see. The manual should say so. If it does not, treat the stated timeframe as required, because an EA that does read the chart timeframe will trade differently on another one.
Frequently asked questions
Can I change the timeframe after attaching an EA?
You can, but the EA reloads and its indicator values change. Read its manual first, and avoid switching during open trades.
What is the best timeframe for a forex Expert Advisor?
There is no universal best one. Use the timeframe the developer designed and tested the EA on. Shorter timeframes mean more trades and more sensitivity to spread, while longer ones mean fewer trades and wider stops.
Does the timeframe matter if my EA trades on every tick?
It can, but not always. Some tick-based EAs ignore the chart timeframe, while others use it for their signals. The manual should say which. If it does not, ask the developer before assuming.
Does the symbol matter as much as the timeframe?
Yes. An EA is usually optimised for specific symbols as well. Use the symbols the developer lists.
What if the manual does not state a timeframe?
Ask the developer before running it live, and forward test on a demo account to see how it behaves.
Trading foreign exchange, gold and CFDs carries a high level of risk and may not be suitable for all investors. Past performance, backtests and live results do not guarantee future returns. This guide is general education, not financial advice.
More on pairs, timeframes and market conditions
- Start here: Best Currency Pairs for Forex Expert Advisors: EURUSD, GBPUSD, USDJPY, EURGBP and Gold Compared
- EURUSD Expert Advisors for MT5: Sessions, Spread, Swap and the Settings That Matter
- The MT5 Economic Calendar and EA News Filters: How They Work, How to Set Them and Where They Fall Short
- Weekend Gaps, Rollover and Swap for Expert Advisors: What Happens to Open Trades and How to Protect Them
More guides
- MT4 vs MT5 for Expert Advisors: which should you use?
- Martingale and grid Expert Advisors: how they work and what can go wrong
- How to buy a cheap MQL5 Expert Advisor safely: price, value and what to check
- Lifetime vs subscription vs rental: which Expert Advisor licence costs less?
- Running an Expert Advisor on gold (XAUUSD): what to check first
- MT5 Expert Advisors: the complete guide
- How to install an Expert Advisor (EA) on MetaTrader 5