1. Overview
Spread Recorder is a MetaTrader 5 Expert Advisor that measures the difference between bid and ask in broker points. It can read historical tick data for a defined period or collect new spread observations while the terminal runs.
Understand real trading costs
Inspect raw spread history as well as minimum, average and maximum values across selected symbols and periods.
Find recurring patterns
Aggregate spread behaviour into 15-minute segments of the day or hourly segments of the week.
Check data coverage
Use daily and weekly datapoint charts to see when quotes were present and where the source history contains gaps.
Build reusable profiles
Create a daily or weekly series from minimum, average or maximum spreads, then adjust, preview and export it.
2. Requirements
- MetaTrader 5 on Windows.
- An active connection to the broker when the EA is initialized.
- The requested symbols must exist at the broker. Spread Recorder can add valid symbols to Market Watch automatically.
- Sufficient tick history for the selected historical interval.
3. Installation
- Copy the complete
SpreadRecorderfolder toMQL5\Experts\TWExperts\inside the target terminal data folder. - Open MetaEditor and compile
SpreadRecorder_1.1.mq5, or use the suppliedSpreadRecorder_1.1.ex5. - Return to MT5 and refresh the Navigator.
- Drag SpreadRecorder_1.1 onto any chart.
- Select the operating mode, time period and symbols, then click OK.
The EA does not require permission to trade because it never sends orders. The terminal must remain connected so broker symbols, ticks and spread values are available.
4. Input parameters
| Parameter | Options / default | Purpose |
|---|---|---|
Mode | History / Live Default: History | History loads stored ticks between the configured dates. Live records new spread observations while the EA is running. |
Start time | Date and time | First timestamp requested in History mode. It must be earlier than End time. |
End time | Date and time | Last timestamp requested in History mode. It cannot be later than the current terminal time. |
Symbols | Current / Market Watch / List Default: Current | Select only the chart symbol, all symbols currently visible in Market Watch, or a custom semicolon-separated list. |
Symbol list | Example: EURUSD;CADJPY;GBPNZD | Used when Symbols is set to List. A maximum of 28 unique symbols is supported; each name may contain up to 15 characters. |
Panel size | Auto / Custom Default: Auto | Auto scales the interface from the detected screen DPI. Custom enables the width, height and font-size inputs below. |
Panel width / height / font | 1400 / 700 / 9 | Manual interface dimensions used only with Custom panel sizing. |
The debug password is reserved for support diagnostics and is not needed during normal operation.
5. Historical and live workflows
Historical mode
- Choose History and set Start time and End time.
- Select the current symbol, Market Watch or a custom symbol list.
- Attach the EA. It requests tick history with up to three synchronization attempts per symbol.
- Wait for the loading message to finish. Large date ranges or symbol lists can take several minutes.
- Use the analysis tabs and profile builder once the panel appears.
Live mode
- Choose Live and select the symbols to record.
- Keep MT5 connected and the EA attached.
- Every ten seconds, the recorder checks each symbol and stores a new observation when the broker has published a newer quote timestamp.
- Use the History view to inspect the data accumulated during the current run.
6. Analysis interface
Select one or more symbols with the buttons on the left, then choose the period and chart view. All selects every symbol and Clear removes the selection. Chart minimum and maximum fields can override automatic Y-axis scaling.
| View | What it shows |
|---|---|
| History | Raw spread observations over time for every selected symbol. |
| Min / Avg / Max | The minimum, arithmetic average and maximum spread for each selected symbol inside the chosen timespan. |
| Daily | Minimum, average and maximum spreads grouped into 96 fifteen-minute segments of the day. |
| Weekly | Minimum, average and maximum spreads grouped into 168 hourly segments from Monday through Sunday. |
| Daily datapoints | Number of observations available for every minute of the day. |
| Weekly datapoints | Number of observations available for every minute of the week. |
The timespan selector offers the last minute, five minutes, hour, 24 hours, week, month or all loaded data. The effective amount of data also depends on the selected mode and available broker history.
7. Create a spread profile
The panel on the right converts the recorded observations for one symbol into a complete daily or weekly series.
| Control | Options | Effect |
|---|---|---|
| Symbol | Any loaded symbol | Selects the source data. |
| Time mode | Daily / Weekly | Creates 1,440 minute values for a day or 10,080 minute values for a week. |
| Spread mode | Minimum / Average / Maximum | Chooses the statistic calculated for each minute bucket. |
| Fill data | Fill gaps / Do not fill gaps | Optionally interpolates missing values between neighbouring recorded buckets. |
| Markup | 0–999% | Adds a percentage margin to every calculated spread value. |
| Smoothing | None / 3 / 5 / 9 / 15 / 25 | Applies a centred moving average with the selected number of values. |
| Rounding | Normal / Up / Down | Converts the calculated result to integer broker points. |
Click Show data to preview the processed series. Recheck the graph after changing gap filling, markup, smoothing or rounding.
8. CSV export format
Click Save to file, choose a filename and save the processed profile. The default folder is MQL5\Files\SpreadRecorder. Each row uses a semicolon as separator:
0;12 1;12 2;13 3;13
- The first value is the minute index: 0–1439 for Daily, or 0–10079 for Weekly.
- The second value is the calculated spread in integer broker points.
- The file contains the processed series shown in the preview, including any filling, markup, smoothing and rounding.
9. Troubleshooting
| Problem | Likely cause and action |
|---|---|
| “Terminal is not connected” | Connect MT5 to the broker account before attaching the EA, then try again. |
| “Failed to receive ticks” | The requested history is unavailable or not synchronized. Open the symbol chart, reduce the date range and allow MT5 to download history before retrying. |
| Symbol does not exist | Use the broker's exact symbol name, including suffixes such as .a or -pro. |
| More than 28 symbols | Reduce Market Watch or shorten the custom list. One instance supports a maximum of 28 symbols. |
| No chart appears | Select at least one symbol and confirm that spread observations were loaded or recorded for it. |
| No data can be saved | The selected symbol has no observations or the calculated profile is empty. Load data and preview it first. |
| History load takes a long time | Tick history is downloaded separately for every symbol. Use a smaller period or fewer symbols. |
| EA fails in Strategy Tester | This is intentional. Run Spread Recorder on a normal connected chart. |
10. Important limitations
- The output reflects the broker, account type, server and symbols from which the data was collected. It should not be assumed to represent another execution venue.
- Historical tick availability and quality are controlled by the broker and MT5.
- Live recording requires MT5, the computer or VPS and the broker connection to remain online.
- Spread alone does not capture commission, swap, slippage, execution delay or market impact.
- Gap filling and smoothing create derived values. Review the raw coverage charts before relying on a processed profile.
11. Support
For installation or technical questions, contact info@antovis.com. Include the Spread Recorder version, MT5 build, broker symbol name, selected mode and the relevant message from the Experts log.