Discrepancy in Strategy Tester Spread for EURUSD on M1

 

Hello,

I have just noticed a discrepancy in the Strategy Tester when examining the spread for EURUSD on the M1 timeframe. In the chart, I have both the Bid and Ask lines displayed. I also have the Market Watch window and the Data Window open.

Here’s the issue: In the chart, the Bid and Ask lines show a significant spread, which is also reflected in the Market Watch window. However, the spread displayed in the Data Window is 0 (zero). At the beginning of the day, all spreads are consistent across the Market Watch, the chart, and the Data Window.

But, starting from around 01:00, the spread shown in the Data Window switches to 0 (zero), while the chart and Market Watch continue to display the correct spread. Furthermore, I tested this with a default EA from MetaQuotes, and the same discrepancy appears around 01:00.

What could be causing this discrepancy?



 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 

The spread shown in the Data Window is not the current spread. It is the spread associated with the OHLC bar data and it is usually the lowest spread to occur during the bar's existence. This is valid for both the live data and in the Strategy Tester.

 
Thank you very much for the clarification. It was extremely helpful. I have no idea how you know these things, but I'm very grateful for it.
 
ammer.jens #: Thank you very much for the clarification. It was extremely helpful. I have no idea how you know these things, but I'm very grateful for it.

Forum on trading, automated trading systems and testing trading strategies

Why is the spread shown in the "data window" completely nonsense?

Fernando Carreiro, 2022.03.14 14:39

The "spread" displayed in the Data Window is a spread for the whole bar (not the current spread). MetaQuotes has never really explained how this is calculated.

For some time, traders speculated that it might be the "average" but some testing done by @Alain Verleyen seemed to indicate that it might in fact be the minimum spread instead.

 
Very interesting, thank you. In my opinion, it would be more helpful if it displayed the average bar spread!