How MetaTrader 4 Models Ticks and Timeframes in Strategy Tests
Summary
The article explains how the MetaTrader 4 strategy tester reconstructs price movement and why tick-based simulation matters. It contrasts testing from completed bars, where future information may leak into calculations, with feeding modeled price changes into the tester one tick at a time. It describes how the tester updates the current bar and indicators as new ticks arrive, and how it synchronizes current-bar values across timeframes for the tested symbol.
The article also discusses limits when reading other symbols, the use of historical files for indicator values on earlier bars, and the need for consistent price data across tester and history files. It recommends checking that required history is available and accurate before testing. These are platform-specific explanations rather than a trading strategy or independent benchmark: the document asserts that MT4’s modeling is accurate but provides no quantitative comparison or validation results, and its guidance depends on the terminal’s data setup and modeling implementation.
Key ideas
- Completed-bar testing can expose future values, while tick-by-tick simulation advances using only newly modeled prices.
- The tester recalculates indicators as prices arrive, approximating their online behavior.
- For the tested symbol, current-bar data is updated synchronously across timeframes.
- Other-symbol data is not modeled in the same way, so its current-bar values may be limited.
- Reliable tests depend on consistent and complete historical data across tester and history files.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.