Correcting Symbol Precision for Trade Simulation in Market Replay
Summary
This article describes a small change to a MetaTrader 5 replay and simulation system so its simulated trading display agrees more closely with live trading behavior. The original setup assigned a custom symbol digit property for chart display and also used that property to normalize simulated prices. The author explains that this caused the position indicator to show incorrect values. The proposed adjustment keeps the trade calculation and chart modes but returns the intended precision directly for use by the simulator, rather than setting the display property in the same function.
The wider system combines replayed or converted bar data with generated ticks, a simulation service, chart controls, and order and position indicators. The position indicator can monitor open positions and request closure when price moves beyond a stop loss or take profit. The article presents this as a final integration adjustment, not a trading strategy or performance study. It provides no quantitative comparison or systematic validation results, and its implementation is specific to the described platform and codebase.
Key ideas
- Separating the precision value used for price normalization from the custom symbol’s display setting can resolve a replay indicator mismatch.
- The replay system converts bars into simulated ticks and can load tick data for replay.
- A position indicator can monitor simulated positions and request closure after price crosses stop loss or take profit levels.
- The article focuses on system integration and provides no evidence about strategy profitability.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.