Simulating Market Price Series and Chart Patterns with Custom Symbols
Summary
This article presents MetaTrader 5 scripts for building custom symbols and generating synthetic market histories for testing indicators and Expert Advisors. It describes creating symbols either with manually specified properties or based on an existing instrument, then generating ticks and minute bars over a selected interval. The bar-generation tools can produce different candle forms, including doji and hammer shapes, and can replace data in portions to reduce memory use when generating large histories.
The article also outlines several trend models, including linear, exponential, power, and stochastic forms, and demonstrates configuring trend scripts to create double-top and double-bottom patterns. It explains adapting the generation interval when targeting timeframes beyond minute charts. These are synthetic data construction techniques rather than market forecasts or trading signals. The resulting histories depend on user settings and modeled assumptions, so testing on them alone cannot establish how a strategy will perform on real prices.
Key ideas
- Custom symbols can hold generated price histories for testing trading software.
- Scripts generate ticks and bars over chosen intervals and can create selected candle shapes.
- Trend simulation includes several mathematical forms and can be configured across periods.
- Trend scripts can be combined to construct examples of double-top and double-bottom patterns.
- Synthetic histories reflect the generation settings and do not establish performance on real market data.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.