Discussing the article: "Constructing a Trade Replay Engine in MQL5: Stepping Through Historical Trades Bar by Bar for Manual Review"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Constructing a Trade Replay Engine in MQL5: Stepping Through Historical Trades Bar by Bar for Manual Review.
An MQL5 script reconstructs closed trades from raw deal history and replays them on the chart bar by bar, drawing entry, exit, stop, target, and an annotation with per‑trade statistics. Four classes separate concerns: a trade data record, history reconstruction with a two‑pass SL/TP lookup and partial‑close aggregation, chart rendering, and a controller with polling‑based keyboard navigation. This enables consistent, fast visual review of each trade in its original candlestick context.
Qualitative trade review examines individual trades in their original candlestick context. It moves the developer beyond aggregate statistics and toward deeper questions. Was the entry taken at a genuine chart pattern, or did the trigger fire on noise? Did price move cleanly toward the target, or did it chop for most of the hold period before eventually resolving? Was the stop placed at a structurally meaningful level, or was it too tight relative to normal price movement? These questions cannot be answered from a spreadsheet. They require looking at actual bars around each trade, trade by trade, in sequence.
Without a dedicated tool, this review means manually cross-referencing timestamps, scrolling to each entry by hand, and redrawing reference lines from memory. That process does not scale beyond a handful of trades, and most developers skip it entirely as a result.
This article builds a tool that removes that friction: an MQL5 script. It loads closed trade history, reconstructs each trade as chart objects, and lets the user step through trades with the arrow keys. The chart scrolls automatically to center each trade as it is selected. The implementation is divided into four files with clearly separated responsibilities, all wired together in a single runnable script.
Author: Ushana Kevin Iorkumbul