Spread Tracker - MetaTrader 4 Script | Trading Script Download - MT4/MT5 Resources - MetaTrader 5 Resources







Track variable spreads using offline charts
Many brokers use variable spreads, but sometimes it is not always clear what the averages are and how they change over time.
The attached indicator code (versions 1.0 and 2.0) will track the bid- to -bid spread and dump it in OHLC format into a standard historical archive that can be opened as a live and monitored offline chart . This indicator code is not a real indicator in the original sense, but a means of generating indicators based on the distribution of OHLC variables over time in an offline chart .
Simply connect the indicator to the M1 chart and generate an offline chart containing minute-by-minute data of the spread. Alternatively, instead of the M1 chart , you can use for example the first half chart and get hourly spread data.
With offline charts for example, we can apply a simple moving average indicator to monitor the average spread over a period of time.
This code uses a DLL call, so remember to enable the " Allow DLL imports " option.
Notice! Please note that you must wait for a full bar to complete before providing any data in this window. Offline charts . For example, if you use the H1 basic chart, then you will have to wait a full hour for at least one bar to be available in the chart. Offline charts .
Update: Version 2.0 now does not require non-standard approximate times as was the case in the first version. It now uses a symbolic suffix instead, while keeping the same general timing as the original. Version 1.0 is still available for those who prefer it.
2.0 version notes:
Simply connect the indicator to the chart and select a symbol suffix to include propagated data for the offline chart . This way, the offline chart will have the same general time as the original but the symbol names will have a symbol suffix appended to both chart names as well as the history file name .
1.0 version notes:
Simply connect the indicator to the chart and select a non-standard approximate time to include propagation data for the offline chart .
Offline chart view example:

Attachment download
📎 SpreadTrack_v1_0r2.mq4 (7.7 KB)
📎 SpreadTrack_v2_0r5.mq4 (8.61 KB)
Source: MQL5 #10983
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •