Every tick based on real ticks vs 1-minute OHLC: What is your backtesting workflow?

Hi everyone,

I'm curious about how most developers and algo traders here structure their testing workflow in the MT5 Strategy Tester.

When optimizing an EA—especially on volatile symbols like XAUUSD—running full optimization with "Every tick based on real ticks" can be very slow. On the other hand, "1-minute OHLC" is much faster, but it can miss intrabar spread spikes and exact execution behavior.

What does your usual workflow look like before moving an EA to a demo or live account?

  1. Do you optimize on 1-minute OHLC first and only validate the best parameter sets using Real Ticks?

  2. Do you rely on built-in Forward Testing or custom criteria ( OnTester ) to avoid overfitting?

  3. How long do you typically run a live demo forward test before trusting the backtest results?

Would appreciate hearing how others balance testing speed and accuracy. Thanks!

Moch Rizki Ramadilah:
Do you optimize on 1-minute OHLC first and only validate the best parameter sets using Real Ticks?

For swing trading EA's, I initially work with OHLC data because that tends to expedite experimentation with tweaking, adding, and/or removing specific functions/features early on. Once the majority of the design dust has settled, I switch over to real ticks for the final run. For a scalping EA based on say, intra-bar VSA logic, OHLC data is largely irrelevant so I skip it.

Moch Rizki Ramadilah:
Do you rely on built-in Forward Testing or custom criteria ( OnTester ) to avoid overfitting?

I actually avoid overfitting by avoiding "selective" optimization. I really prefer to run fresh single backtests instead. Some users have reported differences between optimization results and single run results. If and when I optimize anything, I optimize based on all quality historic data that I have. Usually, I "optimize" a custom chart structure, itself, using MT5 and Python. My last such case involved 26 years of historic M1 data.

Moch Rizki Ramadilah:
How long do you typically run a live demo forward test before trusting the backtest results?

As long as I have solid stats regarding the average/consistency of my broker-dealer's slippage, spreads, commissions, swaps, and liquidity, I don't really worry about forward testing. A demo account doesn't precisely mimic a live account, so there's no point in that. I only use demo accounts for testing the basic functionality/operability of new code.

One thing I believe deserves more attention in XAUUSD backtesting is the difference between a profitable strategy and a strategy that can actually reproduce those results under live execution conditions.

For short-duration breakout systems, that difference can be significant.

I see 1-minute OHLC as a useful tool for checking the general logic and speeding up early development. However, I wouldn't rely on it to validate a strategy where entries, stops, and exits are highly sensitive to intrabar price movements.

Real ticks are essential, but even they don't fully reproduce live liquidity, execution delays, or slippage.

Another important point is that a demo account can confirm whether an EA behaves as intended, but it doesn't necessarily prove that the same execution quality will be available in a live environment.

My preference is to prioritize robustness over the most impressive backtest.

I'm curious how other developers measure the difference between expected execution and actual fills when moving a breakout strategy into live trading.

Andres Felipe Mera #:
Real ticks are essential, but even they don't fully reproduce live liquidity, execution delays, or slippage.

The closest that you can get to real execution delays in the Tester is "Delays" in the Tester Settings set to Random delays. Of course, the main issue there is... it's random. On average, the Random delay is 0 to 18 simulated seconds... and excution delay is not dead nuts equivalent to slippage. Unless you 'ride the tiger" by tracking slippage in a live account (preferably with cent/nano lots), or find a trusted source of broker-dealer stats (that existed way back when on mql4.com but is gone now), Random delay is the only way to go.

Andres Felipe Mera #:
I'm curious how other developers measure the difference between expected execution and actual fills when moving a breakout strategy into live trading.

If you have a broker-dealer that supports straight limit orders, then use them. The potential drawback for FX/CFD trading is the fact that minimum stop distances are prevalent therein─you'll likely need to code an offset distance. In contrast, CME Futures generally have none. This means that in FX/CFD trading, you're a bit less likely to get filled whatsoever on a straight limit order. Of course, this is not so much about measuring the difference between expectations and actual fills, but more about avoiding having do so in the first place. Personally, I'm more than happy to toss FOMO out the window in exchange for avoiding horrendous executions.

For logic that only acts on closed bars I do your first option, optimize on 1 minute OHLC and confirm the finalists on real ticks. For entries that trigger inside the bar I stopped doing that, because the optimizer then ranks parameter sets by the assumed bar path. When I ran the same rules as EA code on real ticks, the per trade result came out at a third to a fifth of what my bar based research engine had shown. On one breakout setup almost half of the triggers fell in the first minute of the move, where entry and stop can sit inside the same M1 bar. The sets that look best on OHLC are often the ones that profit most from that path, so testing only the winners on real ticks comes too late. For those EAs I optimize directly on real ticks over a shorter window with a coarse grid.

For the demo forward test I count trades instead of weeks. Twenty trades tell me whether the code behaves like the tester, they cannot confirm an edge. On XAUUSD also check from which date your server actually has real ticks, because before that date real tick mode runs on ticks generated from M1 bars.

On Andres's question about measuring expected price vs actual fill: that number is what tells you whether the backtest means anything. One simple way is to log it per deal. When the EA sends an order, store the price the signal wanted. In OnTradeTransaction, on TRADE_TRANSACTION_DEAL_ADD, read DEAL_PRICE for that deal and log the difference in ticks together with the time of day.

After a few weeks of live or small-size trading you have a slippage distribution by hour instead of one average. Put that back into the test (entry/exit worse by X ticks in the windows where it is worse) and check if the edge survives.

Real ticks get you closer to live than OHLC, but the tester still fills you at the price you see, with no queue position and no partial fills. The slippage log measures exactly that gap.

Rodrigo #:

On Andres's question about measuring expected price vs actual fill: that number is what tells you whether the backtest means anything. One simple way is to log it per deal. When the EA sends an order, store the price the signal wanted. In OnTradeTransaction, on TRADE_TRANSACTION_DEAL_ADD, read DEAL_PRICE for that deal and log the difference in ticks together with the time of day.

After a few weeks of live or small-size trading you have a slippage distribution by hour instead of one average. Put that back into the test (entry/exit worse by X ticks in the windows where it is worse) and check if the edge survives.

Real ticks get you closer to live than OHLC, but the tester still fills you at the price you see, with no queue position and no partial fills. The slippage log measures exactly that gap.

If you're willing to "ride the tiger" by testing in a live account, here's another coder's Execution Quality Logger:

Code Base

Execution Quality Logger - slippage, fill delay and spread of every deal

Augusto Martin D'anna, 2026.11.12 18:36

Logs the slippage, fill delay and spread of every deal on the account (manual, EAs, SL/TP hits) to a CSV file and shows a live summary. It never trades.

One step I'd add for XAUUSD: after the real-ticks pass, rerun the finalists with a fixed spread set to what you actually see at your trading hours, plus your real commission per lot. Real ticks reproduce the historical spread of the data provider, which is often tighter than a retail account. On gold every 0.01 is $1 per lot, so a 0.10 difference in average spread is $10 per lot. On a strategy doing 20+ lots a week that alone can turn a good equity curve flat.

If your logic executes purely on bar close or uses open prices only, running initial screening on 1-minute OHLC is fine, but for anything holding through the daily rollover or placing tight stops, skipping real ticks will heavily distort your metrics. On XAUUSD, midnight rollover spreads can blow out from a normal seven-cent median up to over two dollars, which instantly wipes out edge or triggers stop-outs that 1-minute OHLC completely ignores. A solid workflow is using coarse screening on bar data or fast external engines, taking only realistic performers with an in-sample profit factor around 1.15 to 1.50 rather than curve-fitted sets above 1.50, and then running real-tick verification with added execution slippage and strict forward windows. Does your EA hold trades past 23:00 server time, or do you force-close positions intraday before the spread widening kicks in?

I start by testing on the 1-minute OHLC chart to identify the strategies, symbols, and parameters that have the potential to generate good results. Then I switch to real-time tick data to confirm them, and finally I extend the testing to several different brokers.
For a gold strategy with intrabar stops, I'd keep one short run on real ticks as a reference before screening a large grid. If the OHLC and real-tick runs diverge, compare the first few orders and fills on the same dates with the same inputs. That often tells you whether the difference came from entry timing, spread, or the order in which the stop and target were touched. I also save the Journal because real-tick mode can fall back to generated ticks for part of the window.