The spread in the Data Window is the lowest spread recorded over the entire lifetime of the bar. It is not the current spread as shown in the Market Watch.
The spread in the Data Window is the lowest spread recorded over the entire lifetime of the bar. It is not the current spread as shown in the Market Watch.
Hi Fernando,
Thank you for your reply. That is a possible reason. Did you find something about it in the documentation or is it based on your observation?
The "spread" for bars is a timeseries as described in the documentation — Documentation on MQL5: Timeseries and Indicators Access
Simple bar spread indicator as reported by the OnCalculate data
Fernando Carreiro, 2022.05.01 14:05
Very simple indicator to plot the values of the spread[] data as reported by the OnCalculate event handler.
As for it holding the lowest spread, that can be found in the forum.
Forum on trading, automated trading systems and testing trading strategies
Can broker deny access to server's historic time-series/spread info?
Alain Verleyen, 2018.07.04 09:44
Not at all. It's an MT5 feature, not available with MT4. The broker can't nothing about that. The only problem is it's not well documented, so people are trying to use it with MT4.
Under MT5, the spread value of MqlRates is the minimum spread of this bar. On Metaquotes world, the spread is always related to Ask-Bid, never to high-low or whatever.
Forum on trading, automated trading systems and testing trading strategies
Tester different Bar Open price in different testing modes
Alain Verleyen, 2018.10.25 17:53
The M1 bar rate spread is the minimum during this M1 bar.
2018.10.25 11:06:00.387 MqlRatesSpread (EURUSD,M1) 2018.10.25 18:05. MqlRates spread=2 pts. tick_volume=115 MaxSpread=0.000060 MinSpread=0.000020 Avg=0.000037 Ticks=115(148)
2018.10.25 11:07:00.392 MqlRatesSpread (EURUSD,M1) 2018.10.25 18:06. MqlRates spread=2 pts. tick_volume=89 MaxSpread=0.000060 MinSpread=0.000020 Avg=0.000038 Ticks=89(136)
2018.10.25 11:08:00.463 MqlRatesSpread (EURUSD,M1) 2018.10.25 18:07. MqlRates spread=3 pts. tick_volume=81 MaxSpread=0.000050 MinSpread=0.000030 Avg=0.000038 Ticks=81(124)
2018.10.25 11:09:00.463 MqlRatesSpread (EURUSD,M1) 2018.10.25 18:08. MqlRates spread=2 pts. tick_volume=113 MaxSpread=0.000050 MinSpread=0.000020 Avg=0.000038 Ticks=113(163)
2018.10.25 11:10:00.552 MqlRatesSpread (EURUSD,M1) 2018.10.25 18:09. MqlRates spread=2 pts. tick_volume=114 MaxSpread=0.000060 MinSpread=0.000020 Avg=0.000037 Ticks=114(163)
The "spread" for bars is a timeseries as described in the documentation — Documentation on MQL5: Timeseries and Indicators Access
As for it holding the lowest spread, that can be found in the forum.
That is great, thank you very much!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
On MT5 the spread shown in data window is different to the spread shown on the market watch. Does anybody know why the values differ from each other?