Skip to content
All library documents

Choosing Price-Bar Modeling Modes for Strategy Testing

Article MQL5 articles

Summary

This article compares three historical price modeling modes in MetaTrader 4 strategy testing: open prices, control points, and every tick. The choice matters because a test based only on completed bars cannot represent all intrabar price paths, while detailed tick histories are often unavailable for long periods. The tester therefore uses smaller-timeframe data and interpolation to construct price sequences.

Open-price testing is intended for systems that act at bar openings and do not need intrabar simulation. Control points use the nearest lower timeframe when available and may fill gaps with predefined patterns, making results approximate. Every-tick modeling combines available lower timeframes, using the smallest available data as control points and interpolation between them. The article notes that one-minute coverage across the test period improves fidelity, while generated tick volumes can slow testing and use substantial resources.

Its examples explain how the modes form a bar sequence and why the tester retains history around a selected date range for indicator calculations. Accuracy remains limited by the quality and completeness of the underlying history; modeled ticks are not a substitute for complete observed tick data.

Key ideas

  • Open-price mode suits strategies that evaluate completed bars and trade at the next bar opening.
  • Control-point mode uses the nearest lower timeframe and may interpolate missing history, so its results are estimates.
  • Every-tick mode uses available lower-timeframe data and interpolation to model movement within bars more closely.
  • Complete, detailed lower-timeframe history improves modeling fidelity but increases data and testing demands.
  • Date-range testing can limit generated sequences while retaining earlier bars needed for indicator calculations.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.